Highlighted

Start a child workflow in Started Mode With JS.

sourabhk3112

15-02-2018

Hi Team,

I am facing Problem while calling a child workflow with "xtk.workflow.PostEvent". After child workflow completes it moved to Finished state but for next  Signal from parent workflow it will not hit it because it is in Finished mode. Is there any logic to Make sure a workflow is always in started mode.

Regards,

Sourabh

Amit_Kumar

Replies

Highlighted

Adhiyan

Employee

16-02-2018

Hi Sourabh,

You need to call the other workflow using the following syntax xtk.workflow.PostEvent ("wkf_internalName", name_activity) .

So if you have a signal on the other workflow which you want to call using PostEvent is should be like :xtk.workflow.PostEvent ("wkf_internalName", "signal") .

Then you need to make sure the workflow with signal activity is started and signal being the first activity.

Regards,

Adhiyan

Highlighted

sourabhk3112

16-02-2018

Hi Adhyan

Thanks for quick response . I tried calling Child workflow by putting  xtk.workflow.PostEvent at the end but it will hit my Signal . But I have to make sure that my workflow goes to started mode but it will not hit the signal It gets hitted by parent workflow.

Regards,

Sourabh Kumar

Highlighted

Adhiyan

Employee

16-02-2018

Hello Sourabh,

Please use the xtk.workflow.start method before calling the PostEvent method to start the workflow via JS.

Regards,
Adhiyan

Highlighted

sourabhk3112

16-02-2018

Thanks Adhiyan !

I tried that also but not working. I think I am not using correct syntax.

If possible can you please share the proper syntax.

Regards,

Sourabh

Highlighted

Vapsy

Employee

18-02-2018

Hi Sourabh,

Can you please post a screenshot of your workflow that hosts external signal to this forum page.

What is the build you are using. A screenshot of that as well for confirmation.

Also is possible add the workflow as a package here or inbox me and Adhiyan with the package details so that we can see why it is going to stopped state every single time.

Regards,
Vipul