-
Notifications
You must be signed in to change notification settings - Fork 33
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
add endpoint for calling mutation ExecuteAfter #425
base: main
Are you sure you want to change the base?
Conversation
FLPATH-1926 https://issues.redhat.com/browse/FLPATH-1926 Signed-off-by: Yaron Dayagi <[email protected]>
FLPATH-2027 https://issues.redhat.com/browse/FLPATH-2027 Signed-off-by: Yaron Dayagi <[email protected]>
|
assessedByInstance = await this.orchestratorService.fetchInstance({ | ||
instanceId: instance.businessKey, | ||
instanceId: variables.orchestratorAssessmentInstanceId as string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the as string
here? I guess not thanks to the check on line 151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mareklibra line 151 helps for the case that it is undefined not for the type. because it is of type unknown (the field orchestratorAssessmentInstanceId) I get compile error. so, yes, it is needed.
inputData: | ||
executeWorkflowRequestDTO.inputData as ProcessInstanceVariables, | ||
definitionVersion: definition.version, | ||
inputData: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part looks suspicious, can you please confirm it is as expected?
When looking at changes around https://github.com/redhat-developer/rhdh-plugins/pull/425/files#diff-dfd9240b67dcd5abbff3560a8d0f341802d928a817c13e2350a999bb2751d5fdR588 , there seems to be just an addition of fields but the change here puts executeWorkflowRequestDTO.inputData
into a sub-property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed this change is required. this is the new implementation in sonataflow. if you have workflowdata field then it is treated as the input to the workflow execution and all the rest is stored without using it. If you do not have workflowdata then the whole variables object is treated as the input to the workflow execution. putting the input in the workflowdata field enables us to pass orchestratorAssessmentInstanceId into variables and having it stored and read when querying the workflow instance/execution/run.
DO NOT MERGE BEFORE #306. This one depends on it.