Wait for SmartObject to finish?

  • 11 November 2019
  • 2 replies
  • 19 views

I Have a workflow that gets PDF from file server (Custom Smart Object) and then send email (via task) with attached file from the PDF SmartObject. (attachment 1).

 

However the larger the file size the longer it takes time for it to complete (10MB PDF takes 5 minutes to complete).

So I want to make it so that the SMO won't go to the next activity until it finished executed properly, but instead of waiting it just go to the next activity which caused the email cannot send and attach the file to it. (attachment 2).

 

From what i know this is possible by using "Wait for External System" on smart object and then finish it by executing the server event finish in REST API of K2. However in my case, there's no trigger or some sort so server event is not an option.

 

Is there any solution for this?


15218i9030CFF239D87C8B.png
13339i42DBA1C0FEF18022.png


2 replies

Badge +7

Hello  @andiak ,

 

Please have a look at the resources below;

 

How To: Configure and use the "Wait for External System" option in a workflow

https://help.k2.com/onlinehelp/k2five/userguide/5.1/default.htm#How-Tos/WaitExternal/Wait-External-System.htm

 

What is best practice for waiting for external response.

https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/What-is-best-practice-for-waiting-for-external-response/td-p/52771

 

Configure a REST API:

https://help.k2.com/onlinehelp/k2five/userguide/5.2/default.htm#K2-Management-Site/Integration/Workflow-REST-API.htm%3FTocPath%3DAdminister%7CK2%2520Management%7CIntegration%7CAPI%2520Configuration%7C_____1

 

Triggering a server event:

Triggering an outcome for a server event

https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/Triggering-an-outcome-for-a-server-event/td-p/22997

 

Automatically triggering the start of processes

https://community.k2.com/t5/K2-Net-Blackpoint/Automatically-triggering-the-start-of-processes/td-p/16351

 

Enjoy

Hi Andiak,


 


I am not sure what or how you want to design your solution, but as a workaround, how about you perform the "GetPDF" method on the form rules just before the "Start Workflow" rule. In this way, the GetPDF method will complete and then the workflow will be started. When the workflow starts, it arrives at the user task where you will be using parameters/variables to pass data from GetPDF to the user task.


 


If your design allows you to do it this way, then try it out. Otherwise, could you please provide a more detailed description of what or how your solution operates? This will help us provide more relevant suggestions


 


I hope this is helpful.


 


Regards,


Katleho

Reply