sample of InvokeWorkflow
I am having trouble building the syntax for invoke workflow. basically I do not know how to create the inputs (idictionary) to the child workflow or specify the outputs (idictionary), so they can read. Does anyone have a sample xaml file that invokes workflow? some help would be great!
my input to the child process is a series of strings and the results from the child process is series of strings.
j
-
Hi Jeff
Just did a quick bit of learning. You will need to do a bit more but I have other things that I need to get on with. Don't forget that there are no client activities allowed in the second workflow although I guess you could have some while you are developing and running that one directly and then comment them or remove them.
Two xaml files below.
Please post how you get on.
Regards
Ralph
Invoker.xaml
==========
<Activity mc:Ignorable="sap" x:Class="{x:Null}" sap:VirtualizedContainerService.HintSize="337,925" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:eac="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" xmlns:eacg="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client" xmlns:eact="clr-namespace:ESRI.ArcGIS.Client.Tasks;assembly=ESRI.ArcGIS.Client" xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi" xmlns:gr="clr-namespace:Geocortex.Reporting;assembly=Geocortex.Reporting" xmlns:gwa="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow" xmlns:gwa1="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow.Activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=System.Core" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=mscorlib" xmlns:s3="clr-namespace:System;assembly=System.ServiceModel" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System.Core" xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System" xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Sequence sap:VirtualizedContainerService.HintSize="297,885" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<Sequence.Variables>
<Variable x:TypeArguments="scg2:IDictionary(x:String, x:Object)" Name="myDict" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg2:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg2:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<gwa1:CreateDictionary x:TypeArguments="x:String, x:Object" sap:VirtualizedContainerService.HintSize="275,59" Result="[myDict]" />
<gwa1:AddToDictionary x:TypeArguments="x:String, x:Object" Dictionary="[myDict]" sap:VirtualizedContainerService.HintSize="275,105" Key="a" Value="[1]" />
<gwa1:AddToDictionary x:TypeArguments="x:String, x:Object" Dictionary="[myDict]" sap:VirtualizedContainerService.HintSize="275,105" Key="b" Value="[1]" />
<gwa1:AddToDictionary x:TypeArguments="x:String, x:Object" Dictionary="[myDict]" sap:VirtualizedContainerService.HintSize="275,105" Key="c" />
<gwa1:InvokeWorkflow sap:VirtualizedContainerService.HintSize="275,105" Inputs="[myDict]" Outputs="[myDict]" WorkflowXamlUri="C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\Default\REST Elements\Sites\Resources\Workflows\invoked.xaml" />
<gwa1:Alert sap:VirtualizedContainerService.HintSize="275,82" Title="["c = " & myDict("c").ToString]" />
</Sequence>
</Activity>=============
Invoked.xaml
==========
<Activity mc:Ignorable="sap" x:Class="{x:Null}" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:eac="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" xmlns:eacg="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client" xmlns:eact="clr-namespace:ESRI.ArcGIS.Client.Tasks;assembly=ESRI.ArcGIS.Client" xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi" xmlns:gr="clr-namespace:Geocortex.Reporting;assembly=Geocortex.Reporting" xmlns:gwa="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=System.Core" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=mscorlib" xmlns:s3="clr-namespace:System;assembly=System.ServiceModel" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property Name="a" Type="InOutArgument(x:Object)" />
<x:Property Name="b" Type="InOutArgument(x:Object)" />
<x:Property Name="c" Type="InOutArgument(x:Object)" />
</x:Members>
<sap:VirtualizedContainerService.HintSize>304,240</sap:VirtualizedContainerService.HintSize>
<mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
<Sequence sap:VirtualizedContainerService.HintSize="264,200" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign sap:VirtualizedContainerService.HintSize="242,57">
<Assign.To>
<OutArgument x:TypeArguments="x:Object">[c]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Object">[CInt(a) + CInt(b)]</InArgument>
</Assign.Value>
</Assign>
</Sequence>
</Activity>=============
0 -
Ralph--
The samples your provided were very helpful and I believe I can expand and customize them very easily to fit out needs. I copied them to our system, wired them into a site and they worked just great! tomorrow I will try putting some of our own variables into the mix.
THANKS for the help!!!!
Jeff
0
Please sign in to leave a comment.
Comments
2 comments