Start Process Using WEB API and get the Response with the Updated Variables

Hi All,

I am creating a WEB API which will in turn trigger a process model.

Now this is been executed, it contains 2 data store entities which gets updated.

now In order to send the response back to the External system My main intention is to send the 

variables which are updated while executing the process model into the response of the WEB API back,

Is this possible,

PS: My thought on this is .... this works on asynchronously where it just starts the process. but doesnt care if the process fails or not.

Please suggest

TIA :)

Harsha

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Hi you shouldn't depend upon the activity chaining to get the updated variables values in web API.

    Because, a!startProcess() invokes a process asynchronously which means process might start immediately or with some delay based on scheduling algorithm/ based on load on server by considering load balancing.

    I know, when you chain the nodes, Appian tries to complete the execution of the chained node as quickly as possible but you cannot rely on that. As per appian documentation, they have clearly mentioned about startProcess function asynchronous behaviour.

    Hence, you cannot be sure about these process to start immediately, it's all your assumptions that it will start immediately, and this will drag your application into issues while it's in production.

    Also you can capture few details, whether process started successfully or failed using the following attributes of this function: onSuccess, onError

    I recommend you, not to rely on this approach, because this will be a temporary solution which won't work always. You need to think about some alternate options to achieve your requirement.
  •   

    Just curious, how can we return the response of process instance without activity chaining the model.

    Any suggestions?

  • 0
    Certified Lead Developer
    in reply to tarunt0003

    Not.

    You need chaining to delay the response up to the point where you gathered the necessary data.

Reply Children
No Data