Skip to content

fix: executionId for activities #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Vasiliy13
Copy link

@Vasiliy13 Vasiliy13 commented Sep 30, 2021

Hello!
Where is a headache to get parent's executionId by activity in some cases. For example if you will try something like:
const activity = execution.definitions[0].getActivityById('activityId');
console.log(activity.parent.executionId);
The result is undefined;

And activity gotten by subscription has a valid executionId:
listener.on('activity.start', activity => console.log(activity.content.parent.executionId));

I investigated few places where it could be hidden and fixed it. I am not sure if it's a correct but it did a job.
Mainly i just distribute newly created executionId from ProcessExecution to starting activities and update already added children in ProcessExecution instance.
What do think?

@Vasiliy13
Copy link
Author

I think i was wrong because there could be many instances of the activity in case when we have a loop or multiple processes and they all share one id, right? But how does it work if getActivityById called by definition return just one value, which one? I think we need something like getActivityByExecutionId and getElementByExecutionId.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant