workflow - Enate.Workflow.Activities 7.0.2
This .Net Workflow Activity library allows easy integration with Enate v7 http://www.enate.net and above.
The Activities will perform authentication when necessary and allow a single authentication token to be passed between concurrent calls to improve performance.
All date/time values are passed in UTC.
Usage
Each Enate Activity has a standard set of arguments:
PlatformURL String
This should be set to the URL of your Enate instance, as you would type in a portal to get to the login page. e.g. https://hosting.enate.net/MyInstance
Username String
Any valid Username for your Enate instance. Only required if AuthenticationToken is not set or has expired.
Password String
The current Password for the user account specified in Username. Only required if AuthenticationToken is not set or has expired.
AuthenticationToken String
After an initial call to an Activity has succeeded it's authentication token can be reused if the next call is made within the configured timoeut window. The timeout is configured per customer instance so please check your token validity duration with Enate Support.
Each successful Activity will output a new AuthenticationToken that resets the timeout window.
GetMoreWork
Returns the next piece of work the User/Robot should work on. The result is represneted by a PacketForList object which contains enough information to determine next steps, which may include getting the full Case/Ticket/Action details with the appropriate Activity.
GetAction
Returns an Action and all it's details as a ActionPacketFull.
Arguments
ActionGUID Guid
The unique identifier of the Action Packet to retrieve.
UpdateAction
Updates an Action in Enate based on changes made.
Arguments
Action ActionPacketFull
An updated copy of the ActionPacketFull as returned by GetAction.
UpdateChecklist
Updates an Action Checklist in Enate. Can be used to show progress during a long running Action (alternatively all Checklist items can be updated at once with UpdateAction).
Arguments
ChecklistItem ActionChecklistItem
The checklist to update the decision for, as returned by GetAction.
GetCase
Returns a Case and all it's details as a CasePacket.
Arguments
CaseGUID Guid
The unique identifier of the Case Packet to retrieve.
Sample
<Activity mc:Ignorable="sap sap2010 sads" x:Class="TestWorkflow"
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
xmlns:ewa="clr-namespace:Enate.Workflow.Activities;assembly=Enate.Workflow.Activities"
xmlns:ewad="clr-namespace:Enate.Workflow.Activities.DTOs;assembly=Enate.Workflow.Activities"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property Name="UserName" Type="InArgument(x:String)" />
<x:Property Name="Password" Type="InArgument(x:String)" />
<x:Property Name="URL" Type="InArgument(x:String)" />
<x:Property Name="Actions" Type="OutArgument(scg:List(ewad:ActionPacketFull))" />
</x:Members>
<sap2010:WorkflowViewState.IdRef>TestWorkflow_1</sap2010:WorkflowViewState.IdRef>
<TextExpression.NamespacesForImplementation>
<sco:Collection x:TypeArguments="x:String">
<x:String>System</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Data</x:String>
<x:String>System.Linq</x:String>
<x:String>System.Text</x:String>
<x:String>System.Activities</x:String>
<x:String>Enate.Workflow.Activities</x:String>
<x:String>Enate.Workflow.Activities.DTOs</x:String>
</sco:Collection>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<sco:Collection x:TypeArguments="AssemblyReference">
<AssemblyReference>mscorlib</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System.Data</AssemblyReference>
<AssemblyReference>System.ServiceModel</AssemblyReference>
<AssemblyReference>System.Xml</AssemblyReference>
<AssemblyReference>System.Activities</AssemblyReference>
<AssemblyReference>Enate.Workflow.Activities</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<Sequence sap2010:WorkflowViewState.IdRef="Sequence_1">
<Sequence.Variables>
<Variable x:TypeArguments="ewad:ActionPacketFull" Name="Action" />
<Variable x:TypeArguments="ewad:PacketForList" Name="MoreWorkResult" />
<Variable x:TypeArguments="x:String" Name="latestToken" />
</Sequence.Variables>
<Assign sap2010:WorkflowViewState.IdRef="Assign_2">
<Assign.To>
<OutArgument x:TypeArguments="scg:List(ewad:ActionPacketFull)">[Actions]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="scg:List(ewad:ActionPacketFull)">[New List(Of ActionPacketFull)]</InArgument>
</Assign.Value>
</Assign>
<ewa:GetMoreWork DisplayName="Get More Work" ExistingAuthenticationToken="[latestToken]" sap2010:WorkflowViewState.IdRef="GetMoreWork_1" Password="[Password]" PlatformURL="[URL]" Result="[MoreWorkResult]" UserName="[UserName]" />
<If Condition="[MoreWorkResult IsNot Nothing]" sap2010:WorkflowViewState.IdRef="If_1">
<If.Then>
<Sequence sap2010:WorkflowViewState.IdRef="Sequence_2">
<ewa:GetAction ActionGUID="[MoreWorkResult.GUID]" DisplayName="Get Action" ExistingAuthenticationToken="[latestToken]" sap2010:WorkflowViewState.IdRef="GetAction_1" Password="[Password]" PlatformURL="[URL]" Result="[Action]" UserName="[UserName]" />
<AddToCollection x:TypeArguments="ewad:ActionPacketFull" Collection="[Actions]" DisplayName="Add Action to Results" sap2010:WorkflowViewState.IdRef="AddToCollection`1_3" Item="[Action]" />
<ParallelForEach x:TypeArguments="ewad:ActionChecklistItem" DisplayName="Update Checklist" sap2010:WorkflowViewState.IdRef="ParallelForEach`1_2" Values="[Action.ActionChecklist]">
<ActivityAction x:TypeArguments="ewad:ActionChecklistItem">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="ewad:ActionChecklistItem" Name="check" />
</ActivityAction.Argument>
<Sequence DisplayName="Update each Checklist Item" sap2010:WorkflowViewState.IdRef="Sequence_3">
<Assign DisplayName="Set Decision" sap2010:WorkflowViewState.IdRef="Assign_1">
<Assign.To>
<OutArgument x:TypeArguments="ewad:ActionChecklistDecision">[check.Decision]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="ewad:ActionChecklistDecision">[ActionChecklistDecision.Yes]</InArgument>
</Assign.Value>
</Assign>
<ewa:UpdateChecklist ChecklistItem="[check]" ExistingAuthenticationToken="[latestToken]" sap2010:WorkflowViewState.IdRef="UpdateChecklist_1" Password="[Password]" PlatformURL="[URL]" UserName="[UserName]" />
</Sequence>
</ActivityAction>
</ParallelForEach>
<Assign DisplayName="Set Action to Complete" sap2010:WorkflowViewState.IdRef="Assign_3">
<Assign.To>
<OutArgument x:TypeArguments="ewad:ActionStatus">[Action.Status]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="ewad:ActionStatus">[ActionStatus.Completed]</InArgument>
</Assign.Value>
</Assign>
<ewa:UpdateAction Action="[Action]" DisplayName="Update Action" ExistingAuthenticationToken="[latestToken]" sap2010:WorkflowViewState.IdRef="UpdateAction_1" Password="[Password]" PlatformURL="[URL]" UserName="[UserName]" />
</Sequence>
</If.Then>
</If>
</Sequence>
<sap2010:WorkflowViewState.ViewStateManager>
<sap2010:ViewStateManager>
<sap2010:ViewStateData Id="Assign_2" sap:VirtualizedContainerService.HintSize="464,60" />
<sap2010:ViewStateData Id="GetMoreWork_1" sap:VirtualizedContainerService.HintSize="464,168" />
<sap2010:ViewStateData Id="GetAction_1" sap:VirtualizedContainerService.HintSize="243.2,200.8">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="AddToCollection`1_3" sap:VirtualizedContainerService.HintSize="243.2,22.4" />
<sap2010:ViewStateData Id="Assign_1" sap:VirtualizedContainerService.HintSize="243.2,60" />
<sap2010:ViewStateData Id="UpdateChecklist_1" sap:VirtualizedContainerService.HintSize="243.2,168" />
<sap2010:ViewStateData Id="Sequence_3" sap:VirtualizedContainerService.HintSize="265.6,392.8">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="ParallelForEach`1_2" sap:VirtualizedContainerService.HintSize="243.2,52.8">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="Assign_3" sap:VirtualizedContainerService.HintSize="243.2,60" />
<sap2010:ViewStateData Id="UpdateAction_1" sap:VirtualizedContainerService.HintSize="243.2,168" />
<sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="265.6,788.8">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="If_1" sap:VirtualizedContainerService.HintSize="464,938.4" />
<sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="486.4,1371.2">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="TestWorkflow_1" sap:VirtualizedContainerService.HintSize="526.4,1451.2" />
</sap2010:ViewStateManager>
</sap2010:WorkflowViewState.ViewStateManager>
</Activity>
PM> Install-Package Enate.Workflow.Activities -Version 7.0.2 -Source https://www.myget.org/F/workflow/api/v3/index.json
> nuget.exe install Enate.Workflow.Activities -Version 7.0.2 -Source https://www.myget.org/F/workflow/api/v3/index.json
> dotnet add package Enate.Workflow.Activities --version 7.0.2 --source https://www.myget.org/F/workflow/api/v3/index.json
source https://www.myget.org/F/workflow/api/v3/index.json
nuget Enate.Workflow.Activities ~> 7.0.2
Copy to clipboard
> choco install Enate.Workflow.Activities --version 7.0.2 --source https://www.myget.org/F/workflow/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "workflow" -SourceLocation "https://www.myget.org/F/workflow/api/v2"
Install-Module -Name "Enate.Workflow.Activities" -RequiredVersion "7.0.2" -Repository "workflow"
Copy to clipboard
Updated to include latest Enate WebAPI functionality.
-
.NETFramework 4.5.2
- FontAwesome.WPF (>= 4.7.0.9)
- Microsoft.Bcl (>= 1.1.10)
- Microsoft.Bcl.Async (>= 1.0.168)
- Microsoft.Bcl.Build (>= 1.0.21)
- Newtonsoft.Json (>= 10.0.3)
- Nito.AsyncEx (>= 4.0.1)
- System.Net.Http (>= 4.3.2)
- System.Net.Http.Formatting.Extension (>= 5.2.3)
- .NETFramework 4.5.2: 4.5.2.0
OwnersAndrew Teece |
AuthorsAndrew Teece |
Project URLhttps://myget.org/feed/workflow/package/nuget/Enate.Workflow.Activities |
LicenseMIT |
TagsEnate workflow integration |
Info1655 total downloads |
1063 downloads for version 7.0.2 |
Download (43.74 KB) |
Found on the current feed only |
Package history
Version | Size | Last updated | Downloads | Mirrored? | |||
---|---|---|---|---|---|---|---|
7.0.2 | 43.74 KB | Fri, 01 Sep 2017 10:18:13 GMT | 1063 | ||||
7.0.1 | 91.59 KB | Wed, 02 Nov 2016 16:22:44 GMT | 563 | ||||
7.0.0 | 78.19 KB | Tue, 01 Nov 2016 20:18:18 GMT | 29 |