1. Process Analysis - Human Workflow Services
www.alliedc.com
BizTalk Human Workflow Services
Allied Consultants
Stability: Dev | QA | Prod
Author: Muhammad Omer
Ref. Number:
Confidentiality Statement
ALL INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED ON THE
BASIS OF STRICT CONFIDENTIALITY AND IS GOVERNED BY THE
AGREEMENTS BETWEEN THE TWO PARTIES. IT MUST NOT BE DISCLOSED IN
WHOLE OR IN PART TO ANY OTHER PARTY AT ANY TIME WITHOUT THE
PRIOR CONSENT AND AUTHORITY IN WRITING FROM ALLIED CONSULTANTS
Process Analysis – Human Workflows Page 1 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
2. Process Analysis - Human Workflow Services
www.alliedc.com
Document Version and Control
Review History
Name Date
Version Control
Version Date Change Summary Updated by
Distribution
Version Date Parties
Process Analysis – Human Workflows Page 2 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
3. Process Analysis - Human Workflow Services
www.alliedc.com
1. Table of Contents
1. TABLE OF CONTENTS...........................................................................................................................3
2. IDEAS..........................................................................................................................................................4
3. OVERVIEW...............................................................................................................................................4
4. VOCABULARY.........................................................................................................................................5
4.1 PRODUCT SPECIFIC (BIZTALK).........................................................................................................5
4.2 GENERIC ACRONYMS AND TERMINOLOGY.........................................................................................5
5. PATTERNS OF THE DOMAIN..............................................................................................................6
6. TASKS.........................................................................................................................................................7
PRODUCT SPECIFIC AREA.....................................................................................................................8
7. GOOD TO HAVE FEATURES IN THE PRODUCT............................................................................8
7.1 COMPONENTS OF A WORKFLOW .......................................................................................................8
7.2 ACTIONS......................................................................................................................................... 8
7.3 TASKS............................................................................................................................................. 8
7.4 WORKFLOW GUIDANCE ...................................................................................................................8
7.5 WORKFLOW MONITORING ...............................................................................................................9
7.5.1 Business Monitoring through BAM (not very appropriate for monitoring the workflow as such)
..................................................................................................................................................................9
7.5.2 Workflow monitoring......................................................................................................................9
8. HOW TO:..................................................................................................................................................10
8.1 GET A SAMPLE RUNNING................................................................................................................10
8.1.1 Comments on Sample:..................................................................................................................10
8.2 PERFORM LOGGING IN HWS..........................................................................................................10
8.3 HOW TO DEPLOY IT AUTOMATICALLY.............................................................................................10
9. HOW IT WORKS ...................................................................................................................................11
9.1 SCENARIO...................................................................................................................................... 11
9.2 ACTIVITY MODELS, ACTIVITY BLOCKS, ACTIONS...........................................................................12
10. USEFUL REFERENCES......................................................................................................................13
11. USEFUL TOOLS...................................................................................................................................13
12. COMMON PROBLEMS.......................................................................................................................13
13. TODO/ NOT COVERED......................................................................................................................14
APPENDIX A: UI ALTERNATIVES FOR HWS...................................................................................15
APPENDIX B: HOW TO CONVERT A WORKFLOW INTO A BIZTALK HWF..........................18
Process Analysis – Human Workflows Page 3 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
4. Process Analysis - Human Workflow Services
www.alliedc.com
2. Ideas
- Try and make a table out of every two pieces of information you feel are connected. This
tends to bring structure to thought.
- Imagine someone with no knowledge of your area is trying to become an expert by
reading this document. This will serve as a reference for when you revisit this topic after
a few months.
- Separate documents if the area is too large to fit reasonably in a document. Too large a
document is worse than one that is too small.
- Design the document so that someone looking at the “Document Map” can browse to his
required information easily. Use the outlining toolbar.
-
3. Overview
<<Mention which product areas you are covering in this document >> e.g. EDI, Flat files…
Process Analysis – Human Workflows Page 4 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
5. Process Analysis - Human Workflow Services
www.alliedc.com
4. Vocabulary
<<What should one say to sounds like an expert. i.e. talk the talk>>
<<Fancy words you can think of>>
4.1 Product Specific (BizTalk)
Term Context Description
Actor - An application or person that performs a task
Action Actions are BizTalk orchestrations that perform a
set of given tasks. They may interact with actors
on behalf of the workflow.
Task An XMLDocument representing a unit of work
assigned to an actor
Activity - A list of actions that an actor can perform.
Activity model is also a kind of activity
Activity Flow - The order in which actions or activity blocks
actually executes
Activity Block Activity Models A set of dependent transactions all of which are
started together and then are run one after the
other by the workflow engine.
A single action is also an activity block.
Activity Model
Activation Task
Message
Activity Model, Actions An XMLDocument submitted to the HWS web
services which results in the instantiation of an
activity block or action
Step Activity Model Designer The occurrence of an action in an activity Model
Transition Activity Model Designer An ordering between the steps
Step Constraints Activity Model Designer Step level constraints enable you to restrict of guide
the set of users that you can choose as targets for
each step
Clause Activity Model Designer
Workflow
4.2 Generic Acronyms and terminology
Term Context Description
Temporal
Consistency
Process Analysis – Human Workflows Page 5 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
6. Process Analysis - Human Workflow Services
www.alliedc.com
5. Patterns of the domain
<< Might want to go into how these are implemented. You might want to refer to a separate
document for this >>
Process Analysis – Human Workflows Page 6 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
7. Process Analysis - Human Workflow Services
www.alliedc.com
6. Tasks
Task Name Input Document
(Embed it if needed)
Output
(Sample if
needed)
Likelihood of
occurrence
- Try to identify common tasks you think will be involved in a typical project in this area.
- Task
o Input required: Based on these the requirement gatherer will ensure he has all
the information that is needed to perform this task.
o Output of the task: Schema xsd…, orchestration odx…
- Be explicit. Try to make templates for the input you require. A good template would be
one which takes the minimum information from the user and derives the most from it.
Process Analysis – Human Workflows Page 7 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
8. Process Analysis - Human Workflow Services
www.alliedc.com
Product Specific Area
7. Good to have features in the Product
Feature Description
Conditional Transitions
<<add columns if you like>>
7.1 Components of a workflow
- How does HWS help you in creating them? (Orchestrations, Schemas, Info path...)
7.2 Actions
- Generally verbs in the workflow boxes can be treated as actions
- What actions are being performed?
- What two blocks can be combined into a single action?
- One action can be two different blocks
- One box can consist of more than one action
- Identify independent and dependant actions??
There is no need to create and action for updating the system for document status. The statuses
are updated whenever an action is called, thus creating a complete work flow for tracking.
7.3 Tasks
- What’s a task?
- How is it defined?
- What tasks are being performed?
7.4 Workflow Guidance
- Free flowing workflows
- Bound workflows through Activity Models
- How are users handled in HWS?
- Fact Retrievers.
- What exactly is a fact incase of CW?
- Where is it stored?
- OOTB Fact retrievers will do?
- If new ones, how can I write my own? SDK Ref i.e.
- Activity Model
- Activity Blocks for independent actions
- Workflow synchronization
Process Analysis – Human Workflows Page 8 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
9. Process Analysis - Human Workflow Services
www.alliedc.com
7.5 Workflow Monitoring
7.5.1 Business Monitoring through BAM (not very appropriate for
monitoring the workflow as such)
7.5.2 Workflow monitoring
- Monitorable through a web service
- What information exactly can be gotten thru the WS?
Process Analysis – Human Workflows Page 9 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
10. Process Analysis - Human Workflow Services
www.alliedc.com
8. How to:
8.1 Get a sample running
1. Follow the steps listed in ms-help://BTS_2004/SDK/htm/ebiz_sdk_samples_jwhu.htm
8.1.1 Comments on Sample:
- Infopath sample is good for high level experience but hard to understand what is
going on underneath.
- Invocation through code helps more in terms of understand the underlying
process
8.2 Perform Logging in HWS
<< Add other things you know how to do >>
8.3 How to deploy it automatically
<<e.g. from a script or a setup wizard>>
Process Analysis – Human Workflows Page 10 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
11. Process Analysis - Human Workflow Services
www.alliedc.com
9. How it works
9.1 Scenario
Assume a scenario where Allied Consultants is automating its build release process. The build
process would be a workflow since it involves human intervention.
1. This workflow would consist of actions. Actions would be things done by individuals or
applications (actors) within the build release.
a. A new workflow needs to be created by calling GetNewActivityFlowID()
b.
2. Actions are orchestrations abiding to the HWS template.
3. Actions are started by giving them an activation task message. Once such a message is
sent an action is instantiated into an action instance
Action
Activation Task Messages
4. Each action might delegate tasks to people who would respond to that action.
5. Actions are completed when the orchestrations representing them run through the
“addallactionspecific logic” block. If an action waits for a response from an actor, then a
receive shape can be placed to represent that wait.
a. Task responses can be sent directly to the orchestration (e.g. through a file port)
or
Process Analysis – Human Workflows Page 11 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
Actor
Action Task Messages Actor
Same Task Message (with
changed values = response)
12. Process Analysis - Human Workflow Services
www.alliedc.com
b. Through the HWS interrupt port. (Create a normal receive port and bind it to the
standard HWS Interrupt port). Client posts the responses to HWS web service
SendTaskResponse method.
6. What actions execute after the completion of a given action (activity Block) can be
determined by using the AddActionToActivityFlow method incase of a
dynamic workflow and AddActivationBlockToActivityFlow in case of
an activity Model.
7. Acitivity models are defined using the
Microsoft.BizTalk.Hws.ActivityModelDesigner API. No graphical tools are available for
the creation of activity Models.
8. When the activity Model below executes, it creates an activity flow.
9.2 Activity Models, Activity Blocks, Actions
When the activity model below runs, it becomes an activity flow.
Process Analysis – Human Workflows Page 12 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
Activity Model
Activity Block Activity block
Actio
n 1
Dependen
t Action 2
Activation task
msgs for all
actions in
activity block
Activation task
msgs for all
actions in
activity block
Independe
nt Action 3
13. Process Analysis - Human Workflow Services
www.alliedc.com
10. Useful References
Make sure you have the latest SDK and documentation from the MS website:
Address Comments
Programming with Human
workflow services
ms-help://
BTS_2004/SDK/htm/ebiz_pr
og_hws_lxfn.htm
HWS Webcast http://msevents.microsoft.com/CUI
/EventDetail.aspx?
EventID=1032250809&Culture=en
-US
SDK D:Program FilesMicrosoft
BizTalk Server
2004SDKSamplesHws
API docs ms-help://
BTS_2004/SDK/htm/frlrfmic
rosoftbiztalkhwssoapservicehwsse
rviceclasstopic.htm
11. Useful Tools
Tool name Useful For Download Link Rate it
12. Common Problems
Symptoms Description Cause Resolution
Process Analysis – Human Workflows Page 13 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
14. Process Analysis - Human Workflow Services
www.alliedc.com
13. TODO/ Not covered
<<Areas that should be explored to understand the area completely but are not covered in the
document>>
Area Reason for not covering it
Synchronization of workflows. Time.
Unlikely to be used.
Too complicated
“Didn’t feel like it” is not a reason, its an excuse
Process Analysis – Human Workflows Page 14 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
15. Process Analysis - Human Workflow Services
www.alliedc.com
Appendix A: UI Alternatives for HWS
Pros and Cons
The sections below describe briefly how this can be done:
Pros Cons
ASP.NET user controls
Thin Forms harder to make than Infopath
Most flexible form creation Necessarily synchronous
VS.NET design time support
Pluggable in Sharepoint and web
forms
Windows Applications
Thick
Infopath
Drag and Drop form creation Thick
Richest form creation toolset Needs some scripting to be able to
connect to make proper HWS
application. (e.g. to display the
activities of a task)
OOTB WS support Doesn’t support VBA yet
Excel
Frequently used Thick
Allows customized mapping
between excel cells/tables/sheets
to XSD maps
Requires Scripting to be able to post
data to HWS service
Word
Very useful for form filling Not so good in displaying xml content
Thick
Outlook
Simplicity in task flow mechanism
since using Outlook functionality
Custom forms to be built to handle
different task messages coming from
HWS. Might have some issues of
custom made forms with Outlook web
access
Access (not sure about this)
In all cases a significant amount of proficiency in XMLDocument Namespace is required.
Excel
Process Analysis – Human Workflows Page 15 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
16. Process Analysis - Human Workflow Services
www.alliedc.com
1. Will still need mechanisms to
a. To extract the XML from the excel
b. Submit to WS
2. Possible Solution can be VBA
3.
Word
Process Analysis – Human Workflows Page 16 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
17. Process Analysis - Human Workflow Services
www.alliedc.com
Use the SaveAs > XML option to save the document as a structured XML.
The same can be done using VBA. Populating it with a filled XML does not appear to be quite so
simple (still needs RnD).
Outlook
Outlook can be another option to interact with HWS web services. Forms built in Outlook
can be used to manage HWS tasks assigned to particular roles. Web Service References
Tool 2.0 is required to access web services from outlook.
The Web Service References Tool 2.0 simplifies the process of locating and accessing
XML Web services by using the notion of XML Web service references. Adding an XML
Web service reference to a client application results in the generation of a proxy class that
serves as a local representation of the XML Web service with which the client can interact.
In other words the Web Service References Tool 2.0 can be used to locate an XML Web
service for the application to access, download the service description to the local
machine and then generate a proxy class for the chosen XML Web service. The
generated proxy class locally represents the exposed functionality of an XML Web
Process Analysis – Human Workflows Page 17 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
18. Process Analysis - Human Workflow Services
www.alliedc.com
service. The proxy class defines methods that represent the actual methods exposed by
an XML Web service. When the client application creates an instance of the proxy class, it
is capable of calling the XML Web service methods as if the XML Web service was a
locally available component.
To make this system web based, Outlook Web Access can be used. All the functionality of
Outlook is provided inside the browser in this interface.
Appendix B: How to convert a workflow into a BizTalk HWF
These are heuristics and not meant for meant as exact rules.
The following process is used as an example:
Current Recoverable Process
<Function> System Technician Team Leader CSR
Penalty Coded & Check
Ordered (Jim Giardina
completes Penalty 00 coding
by 3rd biz day every month)
Run Query
(MRTXRECOV) from
Access App for all RP
and non-RP data
Data is cut and
pasted onto Excel
spreadsheet
Non-RP
(PENCDE>48) are
deleted
Sort by Portfolio
(ACQ, Title, Tax
Service, CLD, VA,
H/O)
Cut & Paste in Lotus
Notes to each Tech
Print Lotus Notes Print HUD1 Research Is Penalty
Recoverable?
Inv. For penalty
amount
Mail inv. To ACQ,
Title, FARETS,
etc.
Doc in AS400LS &
Advise Tl
complete
Recode to Non-
RP QC Invoices Return Inv. To
Tech to mail
Rerun Query to
verify all inv.
Completed.
End
Process
No
Yes For details, see Detailed Biz
Process diagram for each portfolio
Take the Visio workflow diagrams and re-arrange it such:
1. Actors are already identified on the left as rows
2. Identify HWS Actions
a. Each arrow crossing the horizontal actor lines represents a human interaction.
b. An action can be the largest shape between two arrows. (The first pass is shown
in the diagram below)
c. Modify Action shapes according to
i. Reusability of each workflow Block (Split one block to two)
ii. Reusability of each HWF action identified
Process Analysis – Human Workflows Page 18 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
19. Process Analysis - Human Workflow Services
www.alliedc.com
3. Identify HWS Tasks
a. Tasks are documents that travel between action shapes.
b. To whatever extent possible try and keep one large schema for each workflow,
even if the schema becomes complicated. This approach simplifies schema
mapping done in the UI.
c. The consolidated task schema will then contain all the information needed for all
the actions in that workflow to complete.
4. Conditions e.g. IsPenaltyRecovered represent a fork in the activity flow. They can be
modeled in two ways
a. Within an action: This will be the case if the conditional rule is something that
can automatically be determined and does not require human intervention
b. Within the UI: If the condition is something only a human being can determine,
then the condition result is collected by the UI and then the appropriate action
(Recode or PenaltyAmtInvoice) can be invoked based on the decision.
c. It might be appropriate to map these conditions are BTS business rules
depending on the condition. In this case, the condition can be considered as a
5. Identify UIs
a. Typically each action is initiated by a Form.
b. Actions that involve no human intervention will not require forms since the tasks
delivered to them require no UI representation.
c. If Infopath is being used different “Views” can be created for the same document
depending on
i. Who sent it last
ii. What actions were invoked before it
iii. …
iv.
Process Analysis – Human Workflows Page 19 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
20. Process Analysis - Human Workflow Services
www.alliedc.com
6. Activity Models.
a. By Default HWS will not restrict a certain flow between actions. If no restrictions
are applied, the user may invoke the Action MailAndDoc in place of
ResearchToVerify.
b. Restrictions can be apply globally using HWS Admin
c. They can be applied with finer control using activity Models. This has to be done
programmatically.
d. In an activity Model, if two independent activities are placed one after the other,
the HWS runtime invokes the second one immediately after the completion of
the first one.
Process Analysis – Human Workflows Page 20 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.
21. Process Analysis - Human Workflow Services
www.alliedc.com
Process Analysis – Human Workflows Page 21 of 21
Copyright ã Allied Consultants, 2014 All rights reserved. Proprietary and Confidential.