I have a workflow that can be run by hand or called by another workflow.
I need to be able to determine how the workflow was called.
Does anyone know how to determine this?
Thanks.
I have a workflow that can be run by hand or called by another workflow.
I need to be able to determine how the workflow was called.
Does anyone know how to determine this?
Thanks.
That’s a good question….so essentially you want to know if the Workflow was run manually, or as part of another Workflow and how to determine which?
I’ll inquire within. I’m sure the Workflow logs will mention if it was interactive or not, though I’m not sure if that’s enough for you.
Inside the workflow, you can add a script activity which makes a check like such
workflow.getWorkflowId() == workflow.getRoot().getWorkflowId();
This check would return True if the workflow was called directly and false if it was executed inside a parent workflow.
That’s a good question….so essentially you want to know if the Workflow was run manually, or as part of another Workflow and how to determine which?
I’ll inquire within. I’m sure the Workflow logs will mention if it was interactive or not, though I’m not sure if that’s enough for you.
That is exactly what I am looking for. I am writing my workflows so they can either be called by external rest calls or ran internally via other workflows, which means the way workflow functions changes based on how it was run.
Inside the workflow, you can add a script activity which makes a check like such
workflow.getWorkflowId() == workflow.getRoot().getWorkflowId();
This check would return True if the workflow was called directly and false if it was executed inside a parent workflow.
This is awesome, but it does beg a few questions.
Is there a way to interrogate methods?
Inside the workflow, you can add a script activity which makes a check like such
workflow.getWorkflowId() == workflow.getRoot().getWorkflowId();
This check would return True if the workflow was called directly and false if it was executed inside a parent workflow.
I’ll try this.
Inside the workflow, you can add a script activity which makes a check like such
workflow.getWorkflowId() == workflow.getRoot().getWorkflowId();
This check would return True if the workflow was called directly and false if it was executed inside a parent workflow.
Just figured I would circle back to tell you this worked like a charm.
Thank you.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.