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 best solutions below
Related Questions in SYNCHRONIZED
- Understanding Xcode crash message and @synchronized directive
- Synchronize of ScheduledFuture.cancel() method
- Java Multithreading - What Really Happens When Accessing A "Locked" Object?
- Why we cannot use synchronized keyword in an interface method declaration
- confused by synchronized usage
- JPanels not showing up, kinda
- git push succeeded, but remote repository is not updated or synchronized
- Why do we need to specify the lock for synchronized statements?
- Do operations on ThreadLocal have to be synchronized?
- Socket.io countdown synchronously?
- State of threads, locks, and conditions
- improper output of synchronization in java
- Should lock object be volatile (synchronized block, multiple instances of class)?
- Object.wait(0) and Condition.await() fail to return?
- Thread Sleep method behaviour in synchronized block
Related Questions in EXECUTION
- Streaming commands output progress
- SQL Server Index recreate Stored Procedure Slow
- Launch local PowerShell script from link in local browser session
- Javascript, console.log prints prints object, but property is undefined
- Alfresco moving document
- Job not executing at fixed rate
- How to increase compilation and execution priorities of activity on real devices?
- Execution time difference for a function in two schemas
- Selenium C# - methods executed in program.cs are executed in a non sequential manner
- DENYed user wasn't denied - is this a parallel query processing issue?
- Force the execution of a function before exception handling (JAVA)
- How to execute a javascript function on TIDHttp (indy) delphi?
- How to run user code on server in different languages?
- Magento and M2E - How to change max execution conficuration value
- Send stop signal for command from user input in java programatically
Related Questions in ELSA-WORKFLOWS
- Elsa child workflow doesn't return outcomes
- Rgd usage of latest version of elsa3.0 in our production grade application
- How to stop a Timer activity after a certain condition is reached in Elsa Workflow
- Elsa Workflows for the enterprise
- ASP.NET 5 - TypeLoadException - Could not load type 'WebAssembly.JSInterop.JSCallInfo' from assembly 'Microsoft.JSInterop.WebAssembly
- HTTP Endpoint not working with Elsa ERR_CONNECTION_REFUSED
- c# - elsa workflow - child workflow - how to get workflowInstanceId of parent workflow
- how to synchronously execute workflow using Elsa workflow engine
- Workflow Elsa ParallelForEach blocking activity
- Elsa Workflow - How to implement cascade dropdown
- Elsa workflows from client apps
- Elsa work flow trigger and integration with exe
- When will Elsa 2.0 be released?
- Elsa 2.0 Why is this workflow executing both the branches of a fork, when I am expecting only one?
- Cors issue in HttpResponse Activity
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)
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?
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: