Invoked workflow cant use "Get Current User" activity
Hi,
I have a set of workflows that all need to do a similar set of steps. What I am trying to do is separate that set of tasks into its own workflow and then I can call that workflow from any other workflow that might need to perform that task. Idea being to make it easier to maintain the code since its not repeated in multiple locations.
This generally works, but the workflow I'd like to invoke contains the "Get Current User" activity, and it seems to be crashing because of that. I know you can't use client side activities in an invoked workflow, but the above activity is in the "Common Server" category... When I attempt to use the variables created in the Get Currnet User activity, I get the following error: "Object reference not set to an instance of an object.", which I take to mean I'm referencing an object that does not exist. Note that when I run the invoked workflow in workflow simulator, it completes successfully.
Any ideas.
Thanks
-
Hi Zorba,
The Invoke Workflow and Invoke Workflow Async activities initiate the child workflow as if it were a completely new process. This means that they are disconnected from the current HTTP request that triggered the parent workflow so we don't have access to the same information, such as who the connected user is.
The following activities will not work inside an invoked workflow:
- Get Current User
- Get Extension <T>
- Get Request Info
The Reference Workflow activity does not have this limitation. It may work in your case.
--Ryan
0 -
Ryan, I figured it was something like that. Is that documented somewhere?
We are at Essentials 3.15. Do you have to upgrade to 4.0 to use the Reference Workflow activity?
Thanks
0 -
Hi Zorba,
This isn't documented yet because this is the first time we've encountered it. If we cannot find a way to just make it work we will document the limitation.
Yes, the Reference Workflow activity is avaiable as of 4.0.
--Ryan
0 -
Ok, thanks.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare