Elsa workflow supports asynchronously execution of workflow, so we can't get the result on spot, workflow execution performed by a thread, and response back instantly. So after completing workflow execution i'm unable to get actual output of workflow. So is there any way to perform workflow execution synchronously so that I can get the final output.
how to synchronously execute workflow using Elsa workflow engine
1k views Asked by Juni At
1
There are 1 answers
Related Questions in SYNCHRONIZED
- LeetCode 1116 Java Concurrency Issue, will waiting thread revisit code before?
- How to solve the resource temporarily unavailable problem when using YCSB to generate multiple clients to access rocksdb?
- Unexpect Behavior with Multiple Java Threads and TreeMap.put()
- Race condition in ThreadPoolExecutor
- Why would I ever create a separate mutex/lock object?
- How to verify the synchronization results of tsfle in Apache IoTDB when using `pipe`?
- HTML Helper Has A Different Value Than Model
- Multi-threaded Java application is behaving unexpectedly. Can someone point out the problem?
- Thread runs infinitely because `synchronized` does sync access to a field and 4 methods in a concurrency test with two threads
- Why is the Synchronized Block invalidated?
- Best way to call common methods from a Callable class?
- What is causing racing condition in the buffered class
- Synchronized keyword not working as expected when monitor object is shared between multiple threads
- How CPU switches the execution from one thread to another to access a lock resource in Java?
- Is it mandatory to declare a variable volatile when I have a synchronized block to increment an int in Java?
Related Questions in EXECUTION
- sample query for review for improvement on big query
- Execution failed for task ':app:compileFlutterBuildDebug'. > Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1Error:
- Remix to ethereum
- Moodle Forum notifctions
- Why does 1 is printed before 4 in this execution of js code?
- Google Apps - Script executes another script without calling a function of it
- How to adjust differences of hardwares while executing code
- How applications remain in execution?
- Issue with Flink Job Failure when Using Custom Class as DataStreamSource Type
- How could I get hours of each timezone for 2000rows in dataframes
- Consensus and execution clients communication problem in Gnosis node
- Issue in excluding nunit test fixtures from parallel execution
- How do you execute or run a python program in your desktop?
- Permission overwrite open output file. pandoc.exe: withBinaryFile: permission denied (x) Error: pandoc document conversion failed with error 1 Execu
- Is there a way in python to "emulate" running a python file?
Related Questions in ELSA-WORKFLOWS
- With Elsa Workflows 3.0, is there a way to customize the blocks / activities with icons and also the diagrams themselves?
- Elsa Workflow resume from previous activity
- Does Elsa V3 Support State Machines?
- Workflow approval for a Purchase Requisition having multiple line items
- Elsa v3 - Custom activity with blocking event
- Recovering faulted Elsa 2 workflows
- Connect Elsa v3 to Azure AD
- Persistence using Postgres
- How to use the api to import an Elsa workflows flow?
- error when executing a workflow using api
- How to stop a Timer activity after a certain condition is reached in Elsa Workflow
- Rgd usage of latest version of elsa3.0 in our production grade application
- Elsa child workflow doesn't return outcomes
- Elsa workflowcontext concurrency on forked execution
- How do I implement an "undo" action for executed activities in Elsa Workflows?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You can run your workflow synchronously using
IWorkflowRunner.RunWorkflowAsync, which returns aRunWorkflowResultthat contains the executedWorkflowInstance, which contains output that was set by the workflow, if any.The
RunWorkflowAsynctakes the following parameters:IWorkflowBlueprint- the workflow blueprint to run.WorkflowInstance- a workflow instance of the workflow blueprint.ActivityId- Optional. If your workflow has more than one starting activity, you need to specify which one to use.WorkflowInput- Optional. If your workflow expects input, this is where you provide it.To get a workflow blueprint, use
IWorkflowRegistryto find a workflow by name or by type (which is more convenient in case you have your workflow built using the fluent API).For example, if you have a workflow named "HelloWorld", this is how you get the workflow blueprint:
To create a workflow instance, although you could simply instantiate a new
WorkflowInstanceusing its constructor, the simplest way is to useIWorkflowFactorylike this:With both the workflow blueprint and workflow instance at the ready, you can now run the workflow:
As an alternative to this low-level prepping of workflow execution, you can also use a higher-level service that does all this on one go.
For example, if you have a workflow created using the fluent API (i.e. some
IWorkflowimplementation) calledHelloWorldWorkflow, then you can run the workflow usingIBuildsAndStartsWorkflow, like this:That will do the steps I explained earlier for you (and run the workflow synchronously).
Yet another way is to use the higher-level service called
IWorkflowLaunchpad, which has various methods to locate the workflow (or workflows) you want to execute.For example, if you know the workflow definition ID you want to execute synchronously, here's how you would do it: