2 answers
- 10-1
Hi, i think you can try using this method WorkflowManager#getActivityList to retrieve the running activity. Usually, the first 1 is the running 1.
Add your comment... - 10-1
Hello Ranjith,
I'm not sure of your use case. I assume you're writing bean shell in the context of a process flow. In this case, you may use this hash variable: #assignment.activityId#
Just a side note, you can use hash variables in bean shell by treating the hash variable as a literal string, such as --> String activityID = "#assignment.activityId#";
Hope this helps!
- Ranjith
Thanks. But my use case is to make all employee list with account manager workflow variable need to be updated. in this case i have used separate form and in store binder i tried to change workflow variable based on process id which is not working. But Activity id is what its using
- Justin
The above solution should work then, since your use case seem involved in a process flow. Test it out!
- Ranjith
No its not involved in workflow
- Justin
Then it will depend on where you place your bean shell codes. The codes must be within a process context for this to work.
Add your comment...
I need a activity id to set workflow variable. I have process id. Is any bean shell method to fetch migrated process id and current running activity id ?
Please help