Trying to achieve dynamic workflow
In signal stage. I am able to send the signal also I can see the data changes. but workflow not getting triggered not executing the while loop again after state changes.
Trying to achieve dynamic workflow
In signal stage. I am able to send the signal also I can see the data changes. but workflow not getting triggered not executing the while loop again after state changes.
This is the front end result. All executed but signal is not triggered the next execution. Workflow is still in pending state.
Can you show your signal handler code, or the part of your DynamicWorkflow where you register DynamicSignalHandler
via Workflow.registerListener
please?
Could you also explain what you are trying to achieve? You are evaluating an expression and setting its boolean result to isSuccess and then calling
Workflow.await(() -> isSuccess)
, is this by design in case the expression evaluates to false or something else?
Also would suggest to run your expressions in activities or local activities instead of in workflow code, that way they can be retried and probably more important they would not be re-evaluated on workflow replay.
Thanks for quick response.
I was trying to achieve the dynamic workflow by writing my own json sequence but failed. So I have started using DSL example to achieve the same. I am able to resolve the issue. Now closing this question.
Also I have created the Frontend for flow diagram for achieve DSL using drag and drop functionality.
Can you show your signal handler code, or the part of your DynamicWorkflow where you register
DynamicSignalHandler
viaWorkflow.registerListener
please?
Could you also explain what you are trying to achieve? You are evaluating an expression and setting its boolean result to isSuccess and then calling
Workflow.await(() -> isSuccess)
, is this by design in case the expression evaluates to false or something else?
Also would suggest to run your expressions in activities or local activities instead of in workflow code, that way they can be retried and probably more important they would not be re-evaluated on workflow replay.
Hello, I would love to see your front end project, could you share the github?
@tihomir Hi
Need your help.
How do we set timeouts for dynamic activity on runtimes. It would be change for different action.
I use single dynamic activity to run the codes and it’s working perfectly fine.
I probably misunderstood the question. Timeouts are set by a workflow, not by an activity implementation.
How do we set timeouts for dynamic activity on runtimes
You can define your activity timeouts (and retry options if needed) in dsl and generate ActivityOptions from it in workflow code as Maxim mentioned.
In this scenario there is only single activity which is invoked from DSL code. But I want different timeouts for different actions.
DSL generated by front end.
I want to put timeouts in operations. How do I achieve.
So ask is in runtime before activity execution can I change the timeouts which declares on initialize.
For operation state you can add timeouts
which would apply to all actions in this state, for example:
"timeouts": {
"actionExecTimeout": "PT1M",
"stateExecTimeout": "PT5M"
}
actionExecTimeout is timeout if single action (activity) invocation so would translate to StartToClose timeout. stateExecTimeout is timeout of the state so it could be seen as ScheduleToClose timeout if you have a single action per state.
We will improve this in 0.9 Serverless Workflow release to make sure that this can be set on action level and not only state level.
Thanks, yeah 0.9 is way overdue so will try to get it out within a month (fingers crossed )