You are on page 1of 628

Wonderware Training

W O N D E R W A R E T R A I N I N G

Training Manual

y
Revision A

op
December 2019
Part Number 11-GM-10099

C
ot
N

Workflow Management
2019
o
D
© 2019 AVEVA Group plc and its subsidiaries. All rights reserved.

No part of this documentation shall be reproduced, stored in a retrieval system, or transmitted by any means,
electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of AVEVA.

y
No liability is assumed with respect to the use of the information contained herein.

Although precaution has been taken in the preparation of this documentation, AVEVA assumes no
responsibility for errors or omissions. The information in this documentation is subject to change without

op
notice and does not represent a commitment on the part of AVEVA. The software described in this
documentation is furnished under a license agreement. This software may be used or copied only in
accordance with the terms of such license agreement.

ArchestrA, Aquis, Avantis, Citect, DYNSIM, eDNA, EYESIM, InBatch, InduSoft, InStep, IntelaTrac, InTouch,
OASyS, PIPEPHASE, PRiSM, PRO/II, PROVISION, ROMeo, SIM4ME, SimCentral, SimSci, Skelta,
SmartGlance, Spiral Software, Termis, WindowMaker, WindowViewer, and Wonderware are trademarks of
AVEVA and/or its subsidiaries. An extensive listing of AVEVA trademarks can be found at: https://
sw.aveva.com/legal. All other brands may be trademarks of their respective owners.

Contact Information

AVEVA Group plc


High Cross
Madingley Road
Cambridge
C
ot
CB3 OHB. UK

https://sw.aveva.com/

For information on how to contact sales, customer training, and technical support, see https://sw.aveva.com/
contact.
N
o
D
Table of Contents 1

Table of Contents
Module 1 Introduction .................................................................................1-1
Section 1 – Course Introduction......................................................................... 1-3
Section 2 – Introduction to Workflow Management Software ............................ 1-9
Section 3 – Licensing and System Requirements ........................................... 1-23

Module 2 Exploring Workflow Management Features .............................2-1


Section 1 – Workflow Management Core Concepts .......................................... 2-3
Lab 1 – Creating a Workflow Management Repository ................................... 2-11

y
Section 2 – Workflow Management Security ................................................... 2-23
Lab 2 – Setting Up Permissions for Users ....................................................... 2-27
Section 3 – Working with Process Designer and Activities.............................. 2-43
Lab 3 – Creating a Workflow Management Workflow...................................... 2-67

op
Lab 4 – Exporting and Importing a Workflow ................................................. 2-105
Section 4 – Working with Variables ............................................................... 2-113
Lab 5 – Using Human Activities with Variables in a Workflow ....................... 2-117
Section 5 – Scheduler and Engine Activities ................................................. 2-149
Lab 6 – Using Decision Activity for Conditional Checking ............................. 2-161
Section 6 – Integration and Email Activities................................................... 2-193
Lab 7 – Using Script Activity for Conditional Allocation of Approver.............. 2-211

Module 3

C
Working with Workflow Management Controls........................3-1
Section 1 – Controls Overview........................................................................... 3-3
Section 2 – Workflow Management Calendar Control ....................................... 3-9
Lab 8 – Using Calendar for Timeout and Escalations...................................... 3-13
Section 3 – Workflow Management Queue ..................................................... 3-35
ot
Lab 9 – Creating Queues................................................................................. 3-39
Section 4 – File Watcher Configuration ........................................................... 3-63
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow ............. 3-65

Module 4 Forms ...........................................................................................4-1


Section 1 – Workflow Management Forms ........................................................ 4-3
Section 2 – Form Controls and Containers Overview...................................... 4-13
N

Section 3 – Controls and Containers ............................................................... 4-23


Lab 11 – Working with Basic Form Controls.................................................... 4-25
Section 4 – Forms Design Layout and Scripting.............................................. 4-45
Lab 12 – Scripting in Form Controls ................................................................ 4-47
Section 5 – Invoking Forms ............................................................................. 4-77
Section 6 – Using Invoke Form Activity and Getting Data from a Form........... 4-81
o

Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow .... 4-87

Module 5 Lists..............................................................................................5-1
Section 1 – Generic Table List........................................................................... 5-3
D

Lab 14 – Creating a Generic Table List ............................................................. 5-7


Section 2 – Existing Table List......................................................................... 5-29
Lab 15 – Creating an Existing Table List ......................................................... 5-31
Section 3 – Workflow Management Lookup .................................................... 5-53
Lab 16 – Reading Data Using a Workflow Management Lookup .................... 5-59

Module 6 Database Operations ..................................................................6-1


Section 1 – Reading Data from a Database ...................................................... 6-3
Lab 17 – Using the Database Activity ................................................................ 6-7

Workflow Management 2019


2 Workflow Management 2019

Section 2 – Workflow Management Log........................................................... 6-23


Lab 18 – Adding Information into a Workflow Management Log...................... 6-25

Module 7 Reporting..................................................................................... 7-1


Section 1 – Introduction to Business Activity Monitoring .................................... 7-3
Section 2 – Workflow Management Reports ...................................................... 7-5
Section 3 – Introduction to the Process Execution View .................................. 7-13
Section 4 – Introduction to Analyze Reports .................................................... 7-19
Lab 19 – Working with Workflow Management Reports .................................. 7-21

Module 8 Application Distribution............................................................. 8-1

y
Section 1 – Packaging........................................................................................ 8-3
Lab 20 – Creating, Exporting, and Importing a Package.................................... 8-9

op
C
ot
N
o
D

Wonderware Training
y
op
C
Section 1 – Course Introduction
Module 1 – Introduction
1-3
ot
Section 2 – Introduction to Workflow Management Software 1-11
Section 3 – Licensing and System Requirements 1-25
N
o
D
1-2 Module 1 – Introduction

Module Objectives
 Describe the course and agenda
 Describe Business Process Management (BPM)
 Describe Workflow Management
 Explain system requirements and licensing
 Explain installation prerequisites
 Configure Internet Information Services (IIS) settings for Workflow Management
development

y
op
C
ot
N
o
D

Wonderware Training
Section 1 – Course Introduction 1-3

Section 1 – Course Introduction


This section describes the objectives of the course, intended audience, prerequisites, and course
agenda.

Course Description
The Workflow Management 2019 course is a 5-day, instructor-led class designed to provide a
fundamental understanding of the features and functionality of the Workflow Management

y
Business Process Management (BPM) software. BPM software is used to design and manage
business processes, which include the activity flow of people and systems. It enables companies
to model, execute, analyze, and improve operational processes to drive higher levels of
productivity, collaboration, and innovation. This course provides lectures and hands-on labs to

op
supply and reinforce the knowledge necessary to use workflows and forms in the Workflow
Management software. The information includes how to design workflows, work with various
workflow activities to build processes, assign tasks to individuals/teams, work with database data,
design adaptive user interfaces with the help of Workflow Management forms, store form data in
databases, use Workflow Management lists, and understand Workflow Management reports.

Objectives


Use workflow activities
Export and import a workflow
C
Upon completion of this course, you will be able to:
Model business processes in Workflow Management
ot
 Provide collaborative approval and decision making
 Handle timeout and escalation
 Create calendars and queues
 Design and create layouts of forms using the Panel form control and tabs
 Work with databases using form controls
N

 Handle rich data using the Base Form control


 Use lists to add information to repository databases
 Work with reports
 Create, export, and import packages
o

Audience
Individuals who need to use the Workflow Management software to model an existing industrial
automation process or work with automated business processes
D

Prerequisites
Knowledge of the following tools, features, and technologies is required.
 Basic understanding of Business Process Management (BPM)
 Web concepts
 Basic programming
 Basic XML and Transact-SQL

Workflow Management 2019


1-4 Module 1 – Introduction

Course Outline

Module 1 – Introduction
Section 1 – Course Introduction
This section describes the objectives of the course, intended audience, prerequisites, and
course agenda.
Section 2 – Introduction to Workflow Management Software
This section defines Business Process Management (BPM) and explains the Workflow

y
Management software and its usage and position in the automation industry. It discusses the
main capabilities of Workflow Management, describes the Workflow Management
components, and introduces the Workflow Management connectors. In addition, it discusses
Workflow Management implementation and benefits, processes, workflows, and activities. It

op
also introduces DataSource, Repository, Central Configuration, and Enterprise Console.
Section 3 – Licensing and System Requirements
This section describes the Workflow Management editions: Enterprise, Professional, and
Developer. It discusses the licensing model, which consists of the License Server and License
Manager. It also describes hardware and software requirements, including the required IIS
settings for Workflow Management development.

C
Module 2 – Exploring Workflow Management Features
Section 1 – Workflow Management Core Concepts
This section provides an overview of Workflow Management architecture. It describes the
roles of the Workflow Management services and explains how to start Workflow Management
ot
using the Central Configuration. It also explains the function of the Workflow Management
Enterprise Console and how to create a data source and a Workflow Management repository.
Section 2 – Workflow Management Security
This section provides an overview of Workflow Management Security. It discusses working
with the Workflow Management providers: Active Directory, Repository User Provider, and
Forms Provider. It also discusses creating a user, a role, and a security group in Workflow
N

Management and adding users and roles in a security group.


Section 3 – Working with Process Designer and Activities
This section introduces Process Designer. It discusses the Process Designer user interface,
specifically the menu bar’s Publish and Test Run command, the toolbar, design mosaic,
Workflow Management activities, and Activity Properties. It also describes the Workflow
Management Human Activities category.
o

Section 4 – Working with Variables


This section discusses the Workflow Management variables: Variable, Content variable, and
XML variable. It also explains how to declare a variable.
D

Section 5 – Scheduler and Engine Activities


This section explains the following scheduler activities: Scheduler, Time Trigger, and Set
Custom Timer. It also discusses the following engine activities: Rule, Decision, Update
Variable, For-Each Loop, and Database. In addition, it address how to initialize and read a
variable.

Wonderware Training
Section 1 – Course Introduction 1-5

Section 6 – Integration and Email Activities


This section explains the following Integration activities: Script activity, Invoke WebAPI activity,
and File Operations. It also discusses how to work with the following Communication activities:
Email, Notification, and Wait for Email.

Module 3 – Working with Workflow Management Controls


Section 1 – Controls Overview
This section provides a high-level description of all controls and gives more detail on the
Process Designer user interface.

y
Section 2 – Workflow Management Calendar Control
This section discusses the Organizational and Resource calendars. It defines the different
options available in the Calendar control: create shifts, configure working/nonworking days in

op
a week, and configure holidays. It also describes how to use the Calendar control with an
Approval activity.
Section 3 – Workflow Management Queue
This section describes the Workflow Management queue. Discussions address the Manual
Dispatch—LIFO and FIFO, and the Automatic Dispatch—Random, Round Robin, and Least
Used Resource. There are also explanations of how to use automatic and manual queues in a
workflow.
Section 4 – File Watcher Configuration

C
This section explains how to associate a workflow with Enterprise Console events and
configure a file operation for a File Watcher workflow.

Module 4 – Forms
ot
Section 1 – Workflow Management Forms
This section introduces Workflow Management forms and describes the Forms platform and
Form properties tab options. The available tabs are Basic, Appearance, Advanced, and
Scripts.
Section 2 – Form Controls and Containers Overview
N

This section provides an overview of Form controls and containers. It discusses the three
types of Form controls: Controls, Containers, and Custom controls. It describes values for
controls and containers within a form and also explains how to add controls and containers to
the canvas. It describes the menu options of controls and containers. In addition, it introduces
the properties pane for controls and containers and describes the common properties.
o

Section 3 – Controls and Containers


This section describes the text-entry, Date Time, traditional data entry, and miscellaneous
controls and their properties. It also discusses containers.
D

Section 4 – Forms Design Layout and Scripting


This section describes how to design a form layout using the Container controls Base and
Panel Form. It explains how to use the nested Panel control to organize the form layout and
discusses scripting in the Form controls.
Section 5 – Invoking Forms
This section describes the Fill Form and discusses how to use forms to initiate workflows. It
explains how to associate workflows to forms, trigger a workflow by submitting a form, and
access form data within the workflow. It also describes how to invoke forms from within a
workflow and explains form parameters and how to invoke Form activity.

Workflow Management 2019


1-6 Module 1 – Introduction

Section 6 – Using Invoke Form Activity and Getting Data from a Form
This section explains the following properties of the Invoke Form activity: Form Information,
Notification Contents, Decision Influencers, and Responses and Outputs. It also explains how
to create XML variables for forms within a workflow using both the Create an Output Instance
XML variable from the Invoke Form activity's properties and the XML variables from the Start
activity's properties and the Get Schema from FORM option. In addition, it describes how to
use multiple outputs in a form, including how to configure outputs in the form and handle
outputs within a workflow.

Module 5 – Lists

y
Section 1 – Generic Table List
This section explains a generic table list. It describes how to configure a generic table list and

op
generate a Workflow Management form with a generic table list.
Section 2 – Existing Table List
This section explains the need for an existing table list. It describes how to create a table list
and modify a Workflow Management form generated with an existing table list.
Section 3 – Workflow Management Lookup
This section explains the lookup types in Workflow Management: Data Lookup, Role Lookup,

list.

Module 6 – Database Operations


Section 1 – Reading Data from a Database
C
and User Lookup. It describes how to set up a Data Lookup and use lookup as a drop-down
ot
This section describes how to create a variable to read/hold database data, set up a
connection string to communicate with a SQL server database, and configure the Database
activity. It also discusses how to use the Query procedure mode to run a database command
in the Database activity and explains how to read XML data fetched from a database.
Section 2 – Workflow Management Log
This section explains the Workflow Management Logger control. It explains how to use a
N

Workflow Management Logger activity and describes the Information, Warning, and Exception
messages in a Workflow Management log.

Module 7 – Reporting
Section 1 – Introduction to Business Activity Monitoring
o

This section introduces the capabilities of Business Activity Monitoring (BAM). It discusses
built-in reports that show, from the Dashboard, the graphics for the workflow statuses and
workflow instances. It describes the Process execution view and the Management window,
which show the activity that contains the live workflow, a report on what happened in the
D

workflow, and the time duration of activities. It also explains the analysis and alerts per
workflow in the BAM Configuration.
Section 2 – Workflow Management Reports
This section describes the Reports window. It discusses the drop-down list for global reports
versus a workflow report. It explains the default report types. The Dashboard Report shows
the workflow statuses and instances. The Analyze Report shows all transactions and all
executions, and how to access a workflow's Execution view.

Wonderware Training
Section 1 – Course Introduction 1-7

Section 3 – Introduction to the Process Execution View


This section introduces the Process execution view window of a workflow. It explains how to
manage the execution of a workflow from the window and describes the views in the Process
execution view window.
Section 4 – Introduction to Analyze Reports
This section describes how to work with layouts for Analyze Reports, which are table-based
reports. It discusses how to sort, group data (by field and by box), filter data, show and hide
columns, and then save, view, and delete layouts. It also describes how to export the data by
discussing settings and the formats available, including XML, Excel, HTML, and text.

y
Module 8 – Application Distribution
Section 1 – Packaging

op
This section explains how and when to back up the repository data. It discusses the Package
Template, focusing on the advantage of using Package. It discusses Package versus
Recovery. It also describes how to add artifacts to a package template and how to export and
import a package.

C
ot
N
o
D

Workflow Management 2019


1-8 Module 1 – Introduction

y
op
C
ot
N
o
D

Wonderware Training
Section 2 – Introduction to Workflow Management Software 1-9

Section 2 – Introduction to Workflow Management Software


This section defines Business Process Management (BPM) and explains the Workflow
Management software and its usage and position in the automation industry. It discusses the
main capabilities of Workflow Management, describes the Workflow Management components,
and introduces the Workflow Management connectors. In addition, it discusses Workflow
Management implementation and benefits, processes, workflows, and activities. It also
introduces DataSource, Repository, Central Configuration, and Enterprise Console.

y
Introduction
Business Process Management (BPM) software is used to design and manage business
processes, which include the activity flow of people and systems. It enables companies to model,

op
execute, analyze, and improve operational processes to drive higher levels of productivity,
collaboration, and innovation.

C
ot
N

Workflow Management software delivers advanced workflow solutions that help organizations to
build and monitor business processes that include its people, assets, and raw materials. It has
o

100% embeddable web-based architecture and strong integration capabilities, which ensure
collaboration throughout the Enterprise.
As an example of its use in the automation industry, a plant may have provided quality
D

specifications for manufacturing products it produces, and so implements a quality inspection plan.
Using the software, when a quality deviation occurs, the deviation can be managed and approved
by the quality inspector before releasing the finished goods from inventory. Using Workflow
Management software, it is possible to manage timely workflow and execution between the area
where the product is produced and the quality department.

Workflow Management 2019


1-10 Module 1 – Introduction

The benefits that can be expected from implementing Workflow Management include:
 Improved overall efficiency through effective coordination between departments
 Enforcement of Standard Operational Procedures (SOP)
 Replacement of paper documents with electronic forms and information views
 Increased collaboration across functional domains
 Improved compliance with internal and external regulatory mandates
 Process execution visibility and monitoring of organizational performance
 Integration with the automated processes and enterprise systems

y
 Standardization of operational business processes across multiple locations

Overview of Workflow Management User Interfaces

op
The Workflow Management functions are performed through the following interfaces:
Workflow List: This interface is a list of all the workflows defined for a repository. The Workflow
Management Workflow List provides options for categorizing, designing, and publishing workflows.
The Workflow List also contains options for associating the workflow with a Microsoft SharePoint
list/library and event. Options in the Workflow Management Workflow List are wizard-driven, with
wizards provided for all the core activities.

C
Process Designer: This component provides a Visio-like interface with a drag-and-drop
functionality for process modeling.
Queue Management: This window allows you to create and manage queues for allocation of
workflow activities.
Calendar: This interface enables the creation of hierarchical organization and resource calendars.
ot
Calendars are used to determine availability of resources, calculate timeouts, and perform other
scheduling functions.
Work Items List: This component is a web-based interface to which workflow activities are
delivered.
Dashboard: This component enables the monitoring of workflow execution and provides an array
of real-time reports on workflow statuses and performance.
N

Workflow Management Components


The sections below will discuss the Workflow Management components by the following
categories: Envision and Model, Analyze and Optimize, and Integration.
o

Envision and Model


This section discusses the components you use to design and model workflows.
D

Process Designer
Workflow Management Process Designer offers an integrated workflow process design and
deployment tool. The graphical Process Designer is a 100% web-based tool that is used to define
processes to achieve organizational objectives. The software enables a collaborative work
environment that supports cross-functional communication. Audit trails are maintained throughout
the business process lifecycle, from design and deployment to optimization, ensuring fully
compliant processes in line with organizational objectives.

Wonderware Training
Section 2 – Introduction to Workflow Management Software 1-11

Forms Designer
With Workflow Management Forms Designer, you can map out each business process, design
forms, and associate the forms with workflows. Forms Designer provides a complete toolset with
an easy-to-use drag-and-drop interface to generate forms. It also offers a detailed alignment and
layering toolbar to design complex forms. It includes capabilities that support Rapid Application
Development—from creating rich user interfaces to delivering composite applications. You can
design forms, maintain form templates, define a form's business logic, and edit and preview
existing forms. With Forms Designer:
 Forms are published in a web-based format

y
 Forms can be used to facilitate data capture
 Workflows are easy to trigger from forms
 There is a full set of controls, including file attachment, Date Time picker, rich text box,

op
digital signature, and lookup and grid control
Highlights
 Uses 100% web-based Forms Designer with an AJAX-based WYSIWYG editor to create
rich browser-based forms
 Uses layout painter for specifying HTML layouts and for forms preview and testing
 Provides ability to link forms easily to processes and even call forms from within process
workflows


during data entry
C
Uses validation rules to eliminate data entry errors and useful tool tips to guide users

Manages versioning and security of forms


Creates complex forms for use in processes using a simplified drag-and-drop interface for
image-assisted paperless processes
ot
 Provides custom control and Data Grid
 Provides a composite application
Workflow Management allows you to build applications in a web-based environment within the
Enterprise Console to create any number of applications and workflows within multiple
repositories.
N

Enterprise Mobility
The Workflow Management Work Task application enables users to use a mobile phone or tablet
device to access their tasks and improve workforce productivity in large or geographically
distributed infrastructures or industrial plants.
Work items that are downloaded to a device can be viewed offline if connectivity is lost or there is
o

no Internet connection. Users can continue to review and make process-related decisions.
Logging into the application loads the latest work items.
D

Manage and Execute


This section discusses the components you use to manage and run workflows.

Enterprise Console
Workflow Management Enterprise Console is a unified web-based interface to model, run, deploy,
and manage processes, as follows:
 Manage processes in a centralized environment and eliminate the need for multiple data
storage points

Workflow Management 2019


1-12 Module 1 – Introduction

 Access data and create processes from a single interface


 Map different repositories from multiple locations to Enterprise Console
 Perform native versioning, tracking, and audit trails of process changes
 Support multiple user directories
 Provide centralized management of queues and multilevel hierarchical calendars for
multigeography and multi-time-zone support
 Provide administrator views of all process attributes from a single location
 Deliver an integrated solution for process analysis, modeling, execution, and monitoring

y
Workflow Management Enterprise Console provides comprehensive access options for end-to-
end process management on a single and unified interface through homepage options:
 SAP Connections enable enterprises to instantly link to their SAP R/3, so they can
optimally connect to their people, partners, processes, and information

op
 Database Connections enable users to create new data source connections, edit and
delete existing data source connections, and manage security
 Calendar enables setting up multilevel organization and resource calendars
 Queue Management enables setting up queues
 The Users menu option enables user-maintenance tasks, such as adding new users to
the Enterprise Console, editing and deleting existing users, and managing security


C
The Impersonation User menu option enables users to create new impersonation users
that will have domain account users with full rights
File Watcher menu option enables users to continuously monitor one or more folders for
incoming files and raises events like created, updated, renamed, and deleted
SOA Folder option enables users to register a folder, delete a folder, disable an enabled
folder, enable a disabled folder, and manage security settings
ot
 Lookup Settings enables users to create a new database
Benefits
 Easily maps different repositories from multiple locations to Enterprise Console
 Enables transparency on each transaction through native versioning, tracking, and audit
trails of process changes
N

 Provides support for multiple user directories, centralized management of Workflow


Management queues, and multilevel hierarchical calendars for multigeography, multitime
zone support
 Allows administrators to view all process attributes from a single location: automation
status, implementation status, owner, automation provider, related applications, and sub-
processes
o

 Delivers an integrated solution for process analysis, modeling, execution, and monitoring

Human Workflow Services


D

Workflow Management offers a comprehensive and scalable Human Workflow Services


framework for creating applications that support dynamic activity flow. As many common business
processes require human intervention, a workflow infrastructure that connects information workers
to automated processes is a must. Workflow Management tight integration with the entire
Microsoft office stack makes it possible for direct participation in workflows from these
environments.

Wonderware Training
Section 2 – Introduction to Workflow Management Software 1-13

Sophisticated out-of-the-box and customized Human Workflow Services (HWS) within Workflow
Management can be applied to multiple scenarios and include:
 Time-based and recurring escalations
 Multilevel calendars for managing resource availability
 Use of alternate actors when resources are not available
 Escalation mechanisms to ensure tasks are never delayed
Collaborative approvals with queue-based escalations ensure quick dispatch through the multiple
delivery channels of web, mobile, mail, and custom channels.

y
Workflow Management HWS capabilities enable a Queue Management system that is gaining
relevance for:
 Dynamic Queue allocation

op
 Management of resources performing similar functions
 Automatic, semiautomatic, and manual modes of task dispatch
 In-built support for common dispatch patterns such as FIFO, LIFO, and Round Robin
 Effective Resource Utilization
 Task assignments based on resource’s skill sets
 Assigning tasks based on Organization and Resource level calendars
 Shift Management

Communication Channel
C
Workflow Management enables seamless delivery over multiple communication channels for
dynamic task delivery and notifications.
ot
Workflow Management allows users to act on tasks from Outlook through a Microsoft Outlook
plug-in for two-way communication. The user can receive notifications and respond to tasks using
controls available on the Outlook ribbon bar. Specifically, Workflow Management:
 Makes task delivery for various workflow instances dynamic through the Workflow
Management multiple communication and delivery channels
 Has shortened response and approval cycles
N

 Allows participants to act on the task, natively, from within the web or an email
environment
 Creates custom applications around the supported communication channels, using the
Workflow Management Process Designer
 Collaborates effectively on tasks from any location through Workflow Management
support for two-way communication on mobile phones and task notifications enabled on
o

IM services
Workflow Management also gives business users maximum leverage for collaboration capabilities
of SharePoint and InfoPath through its product interface.
D

Advanced Workflow Engine


The Workflow Management advanced workflow software provides an integrated solution to
achieve process agility—from automation and process monitoring to optimization:
 Human-centric workflows for complex processes
 Critical process visibility with a Business Activity Monitoring (BAM) tool and Dashboard
Views
 Collaborative platform that connects disparate business functions

Workflow Management 2019


1-14 Module 1 – Introduction

 Easy Process Designer that empowers business and other non-IT users
 Sustainable workflow architecture with Failover support
 Clustering of servers and processes for effective Load Balancing
Highlights
Design Processes on Browser:
 Uses graphical, drag-and-drop, 100% web-based Process Designer
 Uses modeling framework that captures information by stakeholders for collaborative
process design

y
 Provides quick and easy, code-free process design
Third Party Integration:
 Extends workflow capabilities to existing applications

op
 Uses extensive APIs for customized workflows
 Uses built-in Connectors and Adapters (SharePoint, SAP LOB)
 Provides interoperable workflow system
 Integrates with Active Directory and external data sources
Advanced Workflow Functionality:
Provides out-of-the-box or customizable human workflow services

 Needs minimal IT support


Multichannel Communication:
 Acts on tasks from anywhere
C
Easily builds and deploys complex workflows
ot
 Provides communication support for SMS, Email, and IM
 Customizes task delivery for other channels
Reuse Process Templates:
 Customizes templates once and reuses often
 Needs minimal IT support
N

Respond Quickly to Change:


 Continuously measures and optimizes processes
 Achieves true process agility

Security
o

Workflow Management offers users comprehensive, in-depth, and extendable enterprise-level


security infrastructure for itemized levels of participation throughout the product architecture.
Workflow Management security infrastructure extends to components such as Process Designer,
Work Item List, BAM, Reporting, Queues, and Calendars.
D

The software ensures adherence to corporate and legal security mandates for all applications
deployed through Workflow Management with comprehensive User Rights management.
Collaboration
 Well-mapped, in-depth security cover that allows addition of users/roles to security groups
 User Rights management for workflow participants
 Collaboration for sensitive tasks enabled through user-based access rights for workflow
design functions

Wonderware Training
Section 2 – Introduction to Workflow Management Software 1-15

Customization
 Role-based security groups and rights
 Automatic extendable security for customized applications
 Automatic extendable security for dynamically created lists
Extendable
 Uses existing roles within Active Directory and SharePoint for defining user rights
 Role-based security that extends to Reporting and BAM for qualified views of alerts
BAM Security

y
 Limit viewing rights through Progress, Analysis, and Process execution views
 Set up KPIs and control views for KPIs and other BAM settings like Overdue Analysis,
Performance Analysis, and so on

op
Lists
Workflow Management features a browser-based embeddable central data repository for storing
all Forms data known as Workflow Management Lists. You can create complex business entities
through the Workflow Management List’s advanced lookup functionalities and associate the list
data with Workflow Management workflows. Customized lists can be created dynamically for high
volumes of data for access and association with automated workflows. The Workflow

C
Management repository can have a physical table, which can be used as a container for lists,
where Master Child relationships can be defined using these lists. Here, the Initiate forms-based
approval workflows with data can be called from the Master Lists.
The Workflow Management Lists feature adds an advantage through shortened process cycle
times, enhanced visibility, and seamlessness.
ot
Benefits
 Creates complex business entities quickly through Advanced Lookup functionalities
 Ensures information audit trail
 Provides advanced reporting based on Lists
 Provides item-level security and support for folders
N

 Shortens cycle times


 Enhances visibility
Highlights
 Associates Lists data to workflow
 Ensures information audit trail
o

 Uses Lists to generate various reports


 Provides item-level security and support for folders
 Ensures versioning
D

 Provides in-build list events


 Links different forms
 Is embeddable

Workflow Management 2019


1-16 Module 1 – Introduction

Analyze and Optimize


This section discusses the tools, features, and reports used for analysis and optimization.

BAM and KPIs


Workflow Management BAM enables continuous business monitoring and improvement. The
Workflow Management advanced functionality BAM tool gives organizations powerful leverage to
adapt to ever-changing market dynamics.
Business and process owners are offered extensive Business Intelligence capabilities through

y
drill-down process reports. Configurable KPIs and proactive, multichannel alerts of business
exceptions augment the Workflow Management BAM tool.
BAM Security

op
Configure permissions for various BAM features and set access rights such as View Global
Reports, View Owned Reports, and View Triggered Reports at the Workflow Management
Repository and List level. BAM security also allows secure configuration settings for KPIs,
Overdue Analysis, Performance Analysis, and so on for controlled views of sensitive information.
Configuration
Workflow Management BAM configuration allows setting up critical performance measurement


C
criteria for a workflow. Configure KPIs to define activity thresholds and key Performance Analysis
criteria for work to be monitored for resource analysis, work, and resource performance.
Benefits
Tracks workflow activities for accelerated business efficiency
Provides productivity tracking to eliminate workflow bottlenecks
ot
 Provides dynamic alerts with real-time email notification of violations for business level
policies and SLAs
 Produces exhaustive reports on automated exception handling defined through
customizable KPIs
Highlights
 Provides extensive and drilled-down reporting capabilities
N

 Displays powerful Dashboard Views


 Reports delivery as embedded graphs on email
 Provides several out-of-the-box reporting and activity monitoring views
 Customizes Dashboard Views for different people or functions
 Supports embedding of web parts
o

 Supports out-of-the-box homepage layouts


 Provides strong Microsoft Outlook integration
D

Dashboard and Web Parts


 Customizes Dashboard Views based on roles and functions enabling users to take
suitable action
 Generates detailed reports for different views
 Automates exception handling procedures
 Generates automated emails embedded with detailed graphs of exceptions

Wonderware Training
Section 2 – Introduction to Workflow Management Software 1-17

 Configures an alert for Business Activity threshold and send KPI alerts as emails with
embedded graphs through Workflow Management BAM alerts feature
 Personalizes dashboard for a sales team responsible for tracking revenues and taking
suitable action on business-critical tasks and escalations
Workflow Management supports the enabling of web parts and customization of home screens.
Users can easily customize the content based on their requirements by selecting, removing, and
rearranging the web page contents. An administrator can customize web parts based on the
credentials of a specific user or based on a role.

y
Integration
This section discusses several types of integration software and tools, including connectors.

op
Microsoft Integration
Workflow Management uses the .NET framework and is compatible with .NET versions 4.5/4.6.2.
It integrates seamlessly with the Microsoft product suite:
 Out-of-the-box connectors that enable integration with Microsoft SharePoint
 Seamless integration with Microsoft InfoPath
 Microsoft Workflow Integration Tool


Outlook integration

C
Alerts for business activity thresholds using real-time email notifications through Microsoft

Document routing on familiar channels for escalations and complex approval cycles
Leverage on Microsoft SharePoint (both SharePoint 2013 and 2016) integration
capabilities to work with knowledge resources across your enterprise and design
ot
collaborative workflows
 Transparent document management and comprehensive workflow
The Workflow Management Microsoft workflow integration capabilities extend advanced workflow
functionality and leverages existing Microsoft technology with its native connectors and support for
third party adapters.
SharePoint Connector
N

 Integrates seamlessly with SharePoint 2016 with support for earlier versions
 Extends advanced workflow capabilities to SharePoint
 Builds complex document-based collaborative solutions
 Triggers workflows from inside SharePoint or work from Workflow Management Enterprise
Console
o

Microsoft Office
 Native integration with Microsoft Office
 Creation of Office documents from within workflows
D

 Task delivery and action from within Microsoft Outlook and SMS/text messages
 Creation of custom applications around Microsoft communication mediums
 Leverage of Microsoft Office XML and collaboration of capabilities and linking of
documents to content-driven business processes

Workflow Management 2019


1-18 Module 1 – Introduction

Connectivity with MS InfoPath


 Design forms using Microsoft InfoPath
 Link forms to Workflow Management workflows
 Work collaboratively on forms with embeddable controls
Visio Process Import
BPMN Compatibility: The Business Process Modeling Notation (BPMN) is a published standard
that enables standardization in the notations used for business process modeling. It defines a
comprehensive set of notations for different elements in a process model, such as actions, events,
and links. This makes it possible for business process models created in one Workflow

y
Management application to be used in another if both applications support, and are compatible
with, BPMN standards.
Support for Process Models Created Using IT Pearls BPMN Stencil for Microsoft Visio: The

op
IT Pearls BPMN Stencil for Microsoft Visio from ITP-Commerce adds process modeling
functionality to Visio. Business Analysts can use this familiar tool to model their business
processes and export them as XML files, which in turn can be used in applications that automate
those processes. Workflow Management has a provision to import and integrate the process
models exported from Visio and execute them.
Import of XML File Exported from Microsoft Visio: The Workflow Management import
functionality (found in the Process Designer Settings menu) has a new option to import Visio

C
Process Designs, in addition to the earlier option to import existing Workflow Management
processes. Selecting this option displays the open file dialog box. You can select the Visio process
file and import it. Workflow Management will map the BPMN events and activities to corresponding
Workflow Management activities and recreate the process design. In case the Visio event or
activity does not have a corresponding Workflow Management activity, it will then be retained in
the redrawn process design as a BPMN event or activity.
ot
There is only one user interface provided for conversion of Visio workflow to Workflow
Management. Workflow Management provides API, which gives the entire structure of workflow
definition within Workflow Management. These APIs can be used to import workflow definitions
built in other tools, which then requires a conversion to a Workflow Management understandable
format.
N

Workflow Management Object Access


Workflow Management SOA functionality eliminates the need for custom coding to a certain
degree, by allowing stored data within processes to be easily accessed and reused. For instance,
certain objects (for example, Employee) that already exist within business systems
(for example, HR) can be called to return object-specific details without having to rewrite code.
o

The Workflow Management SOA feature eliminates the need to write custom code by allowing
external applications to be registered or associated within Workflow Management.
Benefits
D

 Reuses existing objects within processes for increased business efficiency


 Provides security for SOA repository
 Enables just-in-time activation of objects within processes
 Provides intelligent solution to eliminate custom coding for highly secure and rights-based
calling of external .NET assemblies
Workflow Management Object Access (SOA) increases business efficiency by reusing existing
objects within processes and ensuring just-in-time activation of objects. SOA offers users an

Wonderware Training
Section 2 – Introduction to Workflow Management Software 1-19

intelligent solution to eliminate custom coding for highly secure and rights-based calling of external
.NET assemblies.

SharePoint Connector
Workflow Management SharePoint Connector extends powerful workflow functionality to the
SharePoint Server. The Connector enables the creation of a centralized, integrated platform for
Collaboration, Business Intelligence, Process Management, and Strategic Business Solutions.
Enterprises with investments already made in Microsoft SharePoint can now leverage, optimize,
and experience advanced Workflow capabilities within the SharePoint environment by using the
connector from Workflow Management software.

y
The SharePoint Connector enables maximum use and broader adoption of SharePoint native
capabilities for enterprise-wide collaboration, centralized process management, improved
productivity, and stronger compliance.

op
Minimal Code Workflow Design
 Visual, web-based drag-and-drop Process Designer
 Workflow built by process owners with minimal IT support
 Enterprise-wide workflows for processing documents, lists, and content in SharePoint
 Complex workflows built, with multi-user routing
Quicker Time to Market


C
Modeled on SharePoint characteristics
Shorter learning curve and training
Empowers users to become immediately productive on familiar interfaces
Extensibility
ot
 Access advanced workflow functionality within SharePoint
 Use built-in SharePoint activities and wizards within workflows
 Build processes for multiple SharePoint sites or specific sites within multiple SharePoint
sites
 Use advanced Workflow Management features like Queues, Dashboards, KPIs, and
N

Reports of Workflow Management within SharePoint


 Use SharePoint List or Workflow Management Forms Designer for easy designing of
forms
Rapid ROI
 Integration with multiple databases
 Integration with Microsoft technology stack
o

 Protected SharePoint investment


 Negligible IT support to build and deploy processes
Secure Process Management
D

 Extends management of security and access right to documents posted on SharePoint


 Provides transparent, traceable processes and enhanced accountability across the
enterprise

Workflow Management 2019


1-20 Module 1 – Introduction

Optimization
 Measure and manage processes
 Get real-time workflow statuses
 Improve business performance

Connectivity with SAP


Workflow Management leverages technology investments in third-party applications with its strong
integration capabilities. Workflow Management support for the SAP LOB Adapter enables
enterprises to communicate with existing SAP R/3 systems and augment native ERP capabilities

y
with Workflow Management advanced workflow functionality.
Connect optimally to people, partners, processes, and information enabled through the Microsoft
SAP LOB connector interface on Single Sign On (SSO) portals within the Workflow Management

op
environment. Create process workflows and link them to information and resources generated
within SAP.
Benefits
 Enables better business decisions when Workflow Management is used with SAP data
workflows
 Provides a completely web-based solution


the Workflow Management interface

Provides rapid implementation C


Makes SAP business processes and information accessible to every employee through

Provides instant usability with no additional SAP training

Allows users to browse the BAPIs available in the SAP system categorized by the
business objects to which they belong
ot
 Provides highly scalable architecture
Highlights
 Eliminates IT dependencies by removing the need for writing code
 Ensures scalability for even complex approval processes
N

 Provides bidirectional information flow; can be retrieved from, as well as submitted to,
SAP
 Focuses on configuration instead of developing custom applications, for seamless data
flow
 Provides codeless tool sets; can call BAPI/RFC with a few clicks
o

Repository DataSource
A Workflow Management repository datasource is used to store all repository-related data. The
DataSource must be created on a machine where a Workflow Management Central Configuration
D

site is installed. A Workflow Management repository contains workflow definitions, queues,


calendars, workflow execution data, and BAM data. The user provider for the repository is also
defined while creating the repository.

Wonderware Training
Section 2 – Introduction to Workflow Management Software 1-21

Central Configuration
The Workflow Management Central Configuration site is a web-based interface that you can use to
create and manage data sources. You can also use it to define, create, and manage repositories
for Workflow Management workflows and run them. In addition, you can view the list of all the
enterprise consoles mapped to repositories using the Enterprise Console List, manage users, view
the list of user providers mapped to a selected repository, and view the list of enterprise servers.

y
op
C
ot
N
o
D

Workflow Management 2019


1-22 Module 1 – Introduction

y
op
C
ot
N
o
D

Wonderware Training
Section 3 – Licensing and System Requirements 1-23

Section 3 – Licensing and System Requirements


This section describes the Workflow Management editions: Enterprise, Professional, and
Developer. It discusses the licensing model, which consists of the License Server and License
Manager. It also describes hardware and software requirements, including the required IIS
settings for Workflow Management development.

Types of Licenses

y
The following are the licenses available for Workflow Management:
 Enterprise Edition
 Professional Edition

op
 Developer Edition
If load balance is enabled during Farm configuration, the Enterprise Edition license is acquired,
based on its availability. The Workflow Management Advance Server Service is installed and
enabled.
If load balance is disabled during Farm configuration, either the Professional Edition or Developer
Edition license is acquired, based on the availability. The Workflow Management Advance Server
Service is installed and disabled.

C
To use Workflow Management Forms Designer, the Workflow Management Forms Server license
must be acquired. The Forms Server license is released when the Workflow Management Client
service is stopped. A Workflow Management Forms license should be activated for each web
server rendering Workflow Management Forms.
ot
Licensing
Workflow Management uses the Aveva licensing system, a server-based licensing subsystem that
provides centralized license management. Licenses must be activated before use. The licensing
system is composed of a browser-based License Manager and a License Server that together
allow you to share and deliver licenses for your installed Aveva products.
N

License Manager
License Manager allows you to quickly access and maintain licenses for all Aveva products in your
different environments. It is:
 Browser-based for scalability and ease of use; it can be remotely accessed by any web
o

browser
 Lightweight standalone software you can install on the same node as the License Server
computer, or on any other node based on your deployment needs
Able to manage one or multiple License Servers to best organize and manage the
D


licenses in your unique environment

Workflow Management 2019


1-24 Module 1 – Introduction

License Server
License Server provides all the functionality to acquire, store, maintain, and serve licenses to your
installed Aveva software. License Server:
 Stores and maintains all licenses and related information
 Securely serves any type of software application being licensed, including Windows
browsers, tablets, and mobile devices
 Provides current license usage information
For more information about licensing and licensing requirements, refer to the licensing
documentation available in Program Files (x86)\Common Files\ArchestrA\Licensing

y
Framework\License Manager or see the Workflow Management ReadMe file on the installation
DVD. You may also contact your local distributor.

op
System Requirements
The hardware and software requirements for Workflow Management are provided below.

Note: Please refer to the ReadMe file that came with your software for more details about
hardware and software requirements, compatibility information, key product notes, and additional
resources.

Hardware Requirements
C
The following table lists the hardware requirements for Workflow Management:
Component Requirement
ot
Processor Minimum: 1.4 GHz (x64 processor)
Recommended: 2 GHz or faster, multi-core processor
Memory Minimum: 4 GB RAM
Maximum (32-bit systems): 64 GB (Enterprise)
Maximum (64-bit systems): 2 TB (Enterprise)
N

For Microsoft SharePoint Environment, Minimum: 8 GB RAM


Hard Disk Minimum: 10 GB of available hard disk space
Recommended: 100 GB or more of available hard disk space
Optical Drive DVD-ROM drive (optional)
Display and Peripherals SVGA (1366 x 768) to WXGA+ (1440x900) resolution monitor
o

Keyboard
Microsoft Mouse or compatible pointing device
D

Wonderware Training
Section 3 – Licensing and System Requirements 1-25

Software Requirements
The software requirements are divided into three categories:
 Operating System Requirements
 Database Requirements
 Browser Requirements

Operating System Requirements


Workflow Management runs on the following Windows Operating System versions. You should

y
apply all the critical updates pertaining to the version of the server. See http://sun.skelta.com/
index.htm#Readme_2.html#o594905 for the latest requirements and additional details.
Windows 10 Windows Server

op
2008 R2
Various Versions 2012 2012R2* 2016 2019
SP1
Standard
or
(See Documentation) Standard or Data Center
Enterprise
64-bit only

C
* KB 2919355 is a prerequisite for Windows Server 2012 R2.
Installation Prerequisites
This manual does not provide installation instructions, but please note that before installing
Workflow Management, the installer installs the following system-specific prerequisites:
 Microsoft .NET Framework 4.7.1
ot
 Microsoft SQL Server System CLR Types for SQL Server 2014
 Microsoft Report Viewer Redistributable 2015
 Microsoft SQL Server System CLR Types for SQL Server 2016
 Microsoft SQL Server 2016 Management Objects
 Common Licensing API Framework
N

 AIM Certificate Manager


 AIM Identity Manager
See The Workflow Management Administrator Guide for installation instructions.

Database Requirements
o

SQL Server is required for Workflow Management. The following versions are supported:
SQL
SQL Server 2012 SQL Server 2014 SQL Server 2016 Server
D

2017
SP1, SP2, SP1, SP2 SP1, SP2
SP3, SP4
Express Standard or Enterprise
(SSME)
64-bit only

Workflow Management 2019


1-26 Module 1 – Introduction

Browser Requirements
Specific versions of the following browsers are supported for specific versions of Workflow
Management. See documentation for the versions.
Microsoft Apple
Microsoft Mozilla Google
Internet Safari
Edge Firefox Chrome
Explorer for Mac
Yes Yes Yes Yes Limited

Internet Information Services

y
Before you install Workflow Management, you must install and configure Internet Information
Service (IIS).
IIS must have the following features enabled:

op
 .NET Extensibility (on Windows 7 and Windows Server 2008 R2), .NET Extensibility 4.5
(on Windows 8.1 and Windows Server 2012), or .NET Extensibility 4.6 (on Windows 10
and Windows Server 2016)
 ASP.NET (on Windows 7 and Windows Server 2008 R2), ASP.NET 4.5 (on Windows 8.1
and Windows Server 2012), or ASP.NET 4.6 (on Windows 10 and Windows Server 2016)
 ISAPI Extensions


ISAPI Filters
Request Filtering
Windows Authentication
Static Content
HTTP Activation
C
ot
Workflow Management requires you to install one of the following versions of IIS based on your
deployment environment:
 7, 7.1 SP1, and 7.5 (Windows 7, Windows Server 2008 R2, and Windows Server 2008
R2 SP1)
 8.0 (Windows 8.0 and Windows Server 2012)
N

 8.5 (Windows 8.1 and Windows Server 2012 R2)


 10 (Windows 10 and Windows Server 2016)
o
D

Wonderware Training
y
op
C
Module 2 – Exploring Workflow
Management Features
ot
Section 1 – Workflow Management Core Concepts 2-3
Lab 1 – Creating a Workflow Management Repository 2-11
Section 2 – Workflow Management Security 2-23
N

Lab 2 – Setting Up Permissions for Users 2-27


Section 3 – Working with Process Designer and Activities 2-43
Lab 3 – Creating a Workflow Management Workflow 2-67
Lab 4 – Exporting and Importing a Workflow 2-105
o

Section 4 – Working with Variables 2-113


Lab 5 – Using Human Activities with Variables in a Workflow 2-117
D

Section 5 – Scheduler and Engine Activities 2-149


Lab 6 – Using Decision Activity for Conditional Checking 2-161
Section 6 – Integration and Email Activities 2-193
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-211
2-2 Module 2 – Exploring Workflow Management Features

Module Objectives
 Provide an overview of Workflow Management architecture
 Create a Workflow Management repository
 Configure Workflow Management security
 Provide an overview of Process Designer
 Export and import a workflow
 Use Workflow Management activities
 Define Workflow Management variables

y
 Explain Human Activities
 Explain Integration and Engine activities
Explain Scheduler and Email activities

op

C
ot
N
o
D

Wonderware Training
Section 1 – Workflow Management Core Concepts 2-3

Section 1 – Workflow Management Core


Concepts
This section provides an overview of Workflow Management architecture. It describes the roles of
the Workflow Management services and explains how to start Workflow Management using the
Central Configuration. It also explains the function of the Workflow Management Enterprise
Console and how to create a data source and a Workflow Management repository.

y
Overview of Workflow Management Architecture
The Workflow Management product architecture helps you understand the various features of

op
Workflow Management. It helps you to effectively plan and deploy Workflow Management in your
environment.

Workflow Management Structural Parts


The following image illustrates the Workflow Management Architecture:

C
ot
N
o

The structural components of Workflow Management are described below.

Workflow Management Enterprise Console


D

This is a web-based interface that allows authorized users to build workflow-driven applications
and participate in these applications. Organizations can create and access their business
applications using Workflow Management Enterprise Console.

Workflow Management 2019


2-4 Module 2 – Exploring Workflow Management Features

Workflow Management Repository


A Workflow Management repository is a container that holds Business Process Management
(BPM) and application-related data. It has a unique name and description.
Workflow Management repositories are stored within the Workflow Management database. You
can also maintain each repository on a different Workflow Management database and isolate the
information. Workflow Management typically requires that you create one repository for an
organization. However, sometimes there may be a need for more than one repository. For
example, you may have separate development and production environments or have a need to
completely isolate applications from each other. One more compelling scenario for creating more

y
than one Workflow Management repository is that of hosted solutions, where each client needs a
secure data store and isolation. In such a case, you will need to create multiple Workflow
Management repositories, which are maintained using Workflow Management Enterprise
Console.

op
Workflow Management Server Controls
Workflow Management Server Controls are user interface layers provided by Workflow
Management. These controls can be reused and embedded in a custom ASP.NET application.
You can extend the functionality of Workflow Management in your application by dragging and
dropping these controls onto the ASP.NET page.

C
These are required only for custom ASP.NET development where a context-sensitive workflow
user interface should be embedded inside the application. The available Workflow Management
Server controls are discussed below.

Workflow Management Workflow List


ot
This lists all workflows defined for a Workflow Management repository. Workflow Management
Workflow List provides options for categorizing, designing, and publishing workflows. It also
contains options for associating the workflow with a SharePoint list or a SharePoint library and
event.

Workflow Management Process Designer


N

The Workflow Management Process Designer is an interface used to model processes. Like other
workflow designing tools, such as Microsoft Visio, it includes drag-and-drop functions that enable
you to draw workflows for your business processes.
For example, you can use Workflow Management Process Designer to design a process for a
support request. This process will involve creation of workflows and defining business logic.
o

Workflow Management Queue Management


The Workflow Management Queue Management enables you to create and manage queues for
allocating workflow activities. This is done using the Workflow Management Queue control.
D

A queue consists of a pool of resources with shared characteristics. The Workflow Management
Queue control offers advanced-level resource optimization. Workflow Management Queue
Management supports industry standard algorithms for automatic task allocation of resources
belonging to a common pool.

Wonderware Training
Section 1 – Workflow Management Core Concepts 2-5

Workflow Management Calendar


The Workflow Management Calendar interface enables the creation of hierarchical organization
and resource calendars. Workflow Management Calendars are used to determine availability of
resources, calculate time outs, and perform other scheduling functions.

Workflow Management BAM Dashboard


The Workflow Management BAM Dashboard is a key Workflow Management Server control. It
enables you to monitor the execution of a workflow and provides an array of real-time reports. The
reports include status and performance of workflows.

y
The dashboard is also instrumental in generating alerts and events, providing reports in graphical
format, ensuring secured access, and providing details for tracking workflows. You can use
Process Reports to schedule reports and generate alerts.

op
Business managers and process administrators can monitor, track, fine tune processes, and make
proactive decisions.

Workflow Management Work Item List


The Workflow Management Work Item List is a web-based interface that lists the various workflow
activities in Workflow Management. The Workflow Management Work Item List provides detailed

interface similar to Microsoft Outlook.

Workflow Management Forms Designer C


information of an activity. You can view and respond to Workflow Management work items from an

The Workflow Management Forms Designer is an intermediate layer between a user and Forms
ot
Engine. It provides an interface that assists you to design, customize, and maintain form
templates, as well as define a business logic specific to a form. Forms are associated with
workflows. These workflows are responsible for driving end-to-end business applications. A form
triggers a business process.
For example, you can use Forms Designer to design an Equipment Maintenance form, which
captures details about maintenance requests in an organization. The designed form can be used
N

as a template by all the employees when submitting maintenance requests.

Workflow Management Lists


A Workflow Management List is a collection of items such as Task lists or Item lists captured using
Workflow Management forms. It acts as a logical table (similar to a database table), but involves a
more complicated structure to represent an entire entity with links to child tables. The data entered
o

in Workflow Management Lists are stored in a Workflow Management repository. It stores


application-level data, which facilitates generation of business reports. Workflow Management
Lists group related information.
D

A Workflow Management Form is used as an interface to enter data in Workflow Management


lists. For example, you can define a Workflow Management list to store all the requests for
equipment maintenance submitted by employees in your organization. Your list can include
parameters (columns or fields), such as Request Date, Request ID, Requested By, and Reason for
Request.

Workflow Management 2019


2-6 Module 2 – Exploring Workflow Management Features

Delivery Channel
A Delivery Channel is an interface for users to interact with workflows. Workflow Management
provides multiple delivery channels, some of which are discussed below.

Browsers
Workflow Management provides controls that can be embedded in web-based applications to view
or respond to Workflow Management Work items.

Messenger Services

y
Workflow Management uses this channel to send tasks or information to messenger applications.

op
Mobile Phones
Workflow Management allows both SMS and e-mail communication. You can send and receive
messages using Workflow Management. The two-way e-mail channel within Workflow
Management is used to deliver and act on tasks directly using mobile phones.

E-Mail

C
Workflow Management also supports two-way e-mail communication. A Workflow Management
Work Item can be delivered to both email and web channels based on the user's preference. The
user can act on the work item from either of the channels. Workflow Management synchronizes
this information.

Microsoft Outlook Applications


ot
Workflow Management provides a Microsoft Outlook plug-in to respond to tasks. It enables
Workflow Management work items to be delivered to Microsoft Office Outlook Inboxes.

Desktop Applications
Workflow Management provides extensive APIs and web services that can be called from various
N

desktop applications to work with Workflow Management Work items.

Forms Engine
The Forms Engine is responsible for every activity starting from when a form is opened until a form
is closed. It captures all the real-time user inputs, processes the inputs, and displays this
information in terms of controls, business logic, and usability.
o

The Forms Engine is triggered when a form is submitted. The submitted form will follow a workflow
based on the business logic defined for the form.
For example, the Forms Engine makes the Maintenance Application form available to an
D

employee when the employee wants to raise a request for maintenance.

Wonderware Training
Section 1 – Workflow Management Core Concepts 2-7

Workflow Management Services


The Workflow Management Server controls various service requests using Workflow Management
Services, which are discussed below.

Workflow Engine Service


This service needs to be running for the execution and control of workflows.

Task Scheduler Service

y
This service handles the execution of all tasks that have not taken place as scheduled
(escalations).

op
Workflow Management Communication Service
This service handles incoming e-mail and SMS communication.

Workflow Management Advanced Server Service


This service provides load balancing and failover support. This service is available only if Workflow
Management Advanced Server Edition is installed.

Workflow Management Client Service

C
This is used internally by Workflow Management for provisioning and deployment.

Workflow Management Mobile Notification Service


ot
This service is used to send notifications to the mobile application Work Tasks.
The Workflow Engine Service can exist on a single machine or on multiple machines. For Load
Balancing and Failover support to function, Workflow Engine Services must be installed on
multiple machines and Workflow Management Advanced Server Service must also be enabled on
these machines.
N

Operational Data
The data created while working with Workflow Management are stored either in SQL or Oracle
databases. These databases are defined while installing the solution. The Workflow Management
Server Controls, Delivery Channel, Workflow Management Services, and Forms Engine connect
to the database to store or retrieve data.
o

Integration Layer
The integration layer acts as an interface between Workflow Management and third-party
D

applications. The integration layer contains various objects, some of which are discussed below.

Entity Infrastructure
Entity Infrastructure is used to manage users across different platforms. An entity has two
categories—User Entity and Role Entity. A User Entity manages all the information for the users
across different data sources. A data source can be an active directory, a SQL provider,
SharePoint users, or more. A Role Entity manages users in roles.

Workflow Management 2019


2-8 Module 2 – Exploring Workflow Management Features

Web Services
Workflow Management provides out-of-the-box activities that can be used to call a third-party web
service from a workflow.

Workflow Management Object Access (SOA)


This object allows reuse of third-party .NET objects in Workflow Management, thereby avoiding
custom coding. Workflow Management allows registration of third-party object assemblies.

Enterprise Event Bus

y
This is a mechanism that handles third-party events, which can be used to trigger a workflow. The
third-party events can include updating SharePoint lists, updating files, and receiving e-mails. All
of these objects work collectively to ensure smooth information exchange.

op
Security and Directory Services
Workflow Management does not force you to create new user accounts and passwords. Instead, it
assumes that you already have some means to authenticate a user name and password. This
allows Workflow Management to use the existing user name and password, without creating
replicas of those user accounts in Workflow-Management-specific tables. The solution therefore


Active Directory
C
supports external Security and Directory Services. This is a service that allows Workflow
Management to use and manage a user's identity stored in an external database.
Workflow Management supports the following Security and Directory Services:

Lightweight Directory Access Protocol (LDAP)


ot
 Any User Directory
 .NET Role Provider

Note: You can create user accounts using Workflow Management. These user accounts are
stored in the Workflow Management User List.
N

SAP
The Workflow Management Extension to Microsoft SAP LOB Adapter enables organizations to
integrate their SAP R/3 application with Workflow Management. Organizations can use the
Workflow Management workflows with their SAP application to make better business decisions.
o

File Watcher
A File Watcher constantly monitors activities in a folder. Whenever there is an activity, such as a
D

file creation or a file update, File Watcher raises events that are used to initiate a workflow.

Third-Party Applications
Workflow Management can integrate with different third-party applications, such as Enterprise
Resource Planning (ERP), Customer Relationship Management (CRM), and Human Resources
Information System (HRIS) using the integration components, such as web services, custom
activities, and API.

Wonderware Training
Section 1 – Workflow Management Core Concepts 2-9

Microsoft Integration
The open architecture of Workflow Management helps you to derive maximum benefits by
integrating it with various Microsoft applications. The Microsoft applications that are integrated are
discussed below.

Microsoft Exchange
Workflow Management integrates with Microsoft Exchange to provide alerts and notifications.

Microsoft SharePoint

y
Workflow Management Connector for SharePoint extends advanced workflow functionality to
SharePoint Server (SPS) and Microsoft Windows SharePoint Services (WSS) to build complex
document-based collaborative solutions. Workflow Management maintains the usage

op
characteristics, as well as the look and feel of the SharePoint Server.

Microsoft Word
Workflow Management integrates with Microsoft Office applications like Microsoft Word to
participate in content-driven business processes.

Microsoft InfoPath

C
Workflow Management allows users to design forms using Microsoft InfoPath and integrate these
forms into workflow processes managed by Workflow Management.

SQL
ot
SQL integrates with Workflow Management to store records.

Microsoft Visio
Workflow Management can integrate with Microsoft Visio and import diagrams created using
Microsoft Visio.
N

Business Rules Engine


For common process-related scenarios, Workflow Management provides basic rules capabilities,
using rule activity, decision activity, and expression building. You can also integrate Workflow
Management with other third-party business rules engines by using integration components, such
as web services, custom activities, and the Event API.
o
D

Workflow Management 2019


2-10 Module 2 – Exploring Workflow Management Features

Creating a Repository Data Source


A Workflow Management repository data source is used to store all repository-related data. The
repository data source must be created on a machine with Central Configuration installed.
A Workflow Management repository contains workflow definitions, queues, calendars, workflow
execution data, and BAM data. The user provider for the repository is also defined while creating
the repository.
To create a repository, start Central Configuration, which you will run as an administrator. On the
Central Configuration web page, open DataSource Settings and in the Datasource List, click Add.
The Manage Datasource page appears, which you can then configure. Note that the Database

y
Type can be either SQL Server or Oracle database.

op
C
ot
N
o
D

Wonderware Training
Lab 1 – Creating a Workflow Management Repository 2-11

Lab 1 – Creating a Workflow Management


Repository

Introduction
In this lab, you will use the Workflow Management Central Configuration site to create a
datasource and a repository within the datasource. The new repository will be used to host the
security settings, workflows, forms, and KPIs to be configured throughout the class. For the

y
security settings, four types of providers determine the users who are allowed to log in to the
repository: Active Directory, Forms, ASP.NET Membership, and Repository User Provider. You will
use Repository User Provider in the labs.

op
Objectives
Upon completion of this lab, you will be able to:
 Create a datasource
 Create a repository

C
ot
N
o
D

Workflow Management 2019


2-12 Module 2 – Exploring Workflow Management Features

Create the Datasource


First, you will open the Workflow Management Central Configuration site and create a new
datasource to be used in this class. The datasource creates a connection string and is where you
specify the database name and database server name. Later, you will create a repository, which
you will associate with this datasource.
1. Open Central Configuration.
The Workflow Management Central Configuration page appears in a web browser.
2. In the left pane, under DataSource, click Datasource Settings.

y
op
C
ot
The DataSource List page appears.
N
o
D

Wonderware Training
Lab 1 – Creating a Workflow Management Repository 2-13

3. Click the Add button to create a new datasource.


The Manage DataSource page appears.

y
op
creating.
C
Next, you will configure the datasource.
4. In the right pane, in the Name field, enter TrainingDS as the name of the datasource you are

5. In the Description field, enter Training DataSource.


6. Ensure Connection String is enabled, and then in Server Name, enter the database server
ot
name or click the Refresh button to the right to automatically add the name.
N
o
D

Workflow Management 2019


2-14 Module 2 – Exploring Workflow Management Features

7. In the Authentication Type drop-down list, select SQL Server.


You may also use Windows Authentication, which will not require you to log in. However, SQL
Authentication is recommended.
8. In the User ID field, enter sa.
9. In the Password field, enter Admin@123.
10. In the Database field, enter RepoTrainingDB as the name of the database you are creating.

y
op
11. Click Test Connection.

C
A message appears confirming that the test connection was successful.
ot
12. Click Close.
N

13. On the Manage DataSource page, click OK to create the data source.
After a few moments, a message appears confirming that the data source was created.
o

14. Click Close.


D

Wonderware Training
Lab 1 – Creating a Workflow Management Repository 2-15

The DataSource List page appears with the newly created datasource.

y
Create the Repository

op
Next, you will create a new repository in the newly created datasource.
15. At the top-left of the page, click Workflow Management Central Configuration.

C
ot
N

The Workflow Management Central Configuration page appears.


16. In the right pane, under Repository, click Repository Settings.
o
D

Workflow Management 2019


2-16 Module 2 – Exploring Workflow Management Features

The Repository List page appears.

y
op
17. Click the Add button to create a new repository.
The Manage Repository page appears. You will have to scroll down to see all the areas you
have to configure.
18. In the right pane, in the Repository DataSource drop-down list, ensure TrainingDS is
selected.

Description:
TrainingRepository
Training Repository C
19. Configure the Repository Name area as follows:

Repository Name:

20. In the Mail Setting area, leave the email fields with their default entries.
ot
21. For the Alert initiator of the Workflow options, click No.
This alert is used to send a notification when you initiate a process.
N
o
D

Wonderware Training
Lab 1 – Creating a Workflow Management Repository 2-17

22. In the Servers field, click your server name.


The Enterprise Consoles field is updated with a list of the URLs available in the selected
server. If there is more than one URL, the first is selected by default.

y
op
23. For Theme Name, leave Default.

C
You are able to select different colors for the theme here.
24. In the Resource Provider drop-down list, leave the default Repository User Provider.
When the repository is configured with Repository User Provider as the Resource Provider,
an admin user account is created for the administrator role.
ot
N

25. In the Auto Log Off Settings area, in the Time (in Minutes) field, enter 25.
This will cause the system to log off after 25 minutes of inactivity. Remember this as you work
on the labs.
o

26. In the Date Configuration Flag for Alternate Actors area, click the Enable Date Settings
check box.
D

27. Click OK to create the repository.

Workflow Management 2019


2-18 Module 2 – Exploring Workflow Management Features

The system will create the repository and associate the database you created earlier with this
repository.
After a few moments, the Administrator Configuration page appears.
This page allows you to set up the administrator for the repository. The Repository User
Provider you selected in Step 24 appears here in the User Lookup field as the default
administrator. The password for this default user is admin.

y
op
You can go to Step 33 to continue with this admin user. However, the next four steps show
you how you would search for and add another user as the administrator, if you had additional
users. Since you only have one user at this stage, the search will find the same Repository

the User Lookup window. C


User Provider, but you can follow the steps to learn how to add another user if you had one.

28. To configure any existing user as an administrator, click the User Lookup button to open

29. In the Search For field, enter the name of an existing user (admin) and confirm that in the
drop-down list, SK User Name is selected.
ot
30. Click Search.
The name appears in the Available Resources area.

31. Select the name and click the right arrow button to move the user to the Selected
Resource area.
N
o
D

32. Click Update.

Wonderware Training
Lab 1 – Creating a Workflow Management Repository 2-19

The Administrator Configuration page reappears with the specified administrator added to
the User Lookup field.

y
33. Click OK.

op
A message appears confirming that the Administrator was configured successfully.

34. Click Close.


C
The Repository List page reappears with the newly created repository.
35. Click the Site Path link.
ot
N

The Enterprise Console appears and, after a few moments, the repository that was created
o

appears with the repository name, description, and provider.


36. Click Repository User Provider.
D

Workflow Management 2019


2-20 Module 2 – Exploring Workflow Management Features

The Enterprise Console login page appears.


37. In the User Name and Password fields, enter admin.

y
op
38. Click Login.

C
The logged in page for the administrator appears, as indicated by the admin user at the top-
right of the page.
ot
N
o
D

Wonderware Training
Lab 1 – Creating a Workflow Management Repository 2-21

39. At the top-left of the page, click the hamburger to see all the menu options available to
administrator.

y
op
C
40. At the top-right of the page, click the admin user, and then click Log Out.
ot
N
o
D

Workflow Management 2019


2-22 Module 2 – Exploring Workflow Management Features

You will be logged out.

y
op
41. Minimize the window.
C
ot
N
o
D

Wonderware Training
Section 2 – Workflow Management Security 2-23

Section 2 – Workflow Management Security


This section provides an overview of Workflow Management Security. It discusses working with
the Workflow Management providers: Active Directory, Repository User Provider, and Forms
Provider. It also discusses creating a user, a role, and a security group in Workflow Management
and adding users and roles in a security group.

Introduction to Security Framework

y
The requirements of security are to assign access rights based on a hierarchical model; if there
was no hierarchy in organizations, there would be no need for assigning security rights. However,
most organizations have many hierarchies that have different access rights. The security
mechanism in the organization provides restricted access to data. By making access decisions,

op
the security mechanism can enforce rules about who can access what.
For example, an administrator and developer cannot have the same access rights because the
administrator is superior and needs access to most or all of the rights. Similarly, an employee with
a higher designation, for example a maintenance engineer, should generally have more rights than
an operator. It is for this purpose that access rights have to be clearly defined.
Workflow Management introduced the security framework to secure the repository in various

C
ways. The security framework uses security rights, security groups, and security group resource
mapping to control the access to features in the repository.

Security Rights
The security rights include: CanCreateItem, CanDeleteItem, and CanDesignWorkflow.
ot
Security Groups
The security groups are Administrator, Contributor, Reader, and Limited Access:
 Administrator: View, add, modify, and delete rights to the entities
 Contributor: View and add rights to the entities
N

 Reader: Only view rights to the entities


 Limited Access: Limited rights to the entities

Security Group Resource Mapping


Security Group Resource Mapping maps users or roles to security groups.
o

Roles can be mapped to security groups along with the priority. Users can also be explicitly
mapped to security groups. On logging in to the repository, users will have the privileges given to
the security group to which they belong.
D

For example, if the logged-in users belong to the administrator security group, they will have all the
privileges of the administrator security group.

Workflow Management Security


Workflow Management has enterprise rights and security features. The rights and security can be
defined for groups, and users can be mapped to these groups. The user will be able to perform
only those tasks for which the right has been given.

Workflow Management 2019


2-24 Module 2 – Exploring Workflow Management Features

Workflow Management allows effective collaboration during workflow creation and process and
allows you to define user-based access rights for workflow design functions. You can define
security for the items, forms, or folders at the list level and define security for the forms or lists in a
folder. It also offers comprehensive security for reporting Work item, Calendar, Queue, and BAM.
The Security Framework allows the administrative user to administer, manage, and provide
access rights and define roles and responsibilities for users, based on their individual roles or
based on their group. It makes managing users across various features of Workflow Management
much easier and makes applications more secure.
Workflow Management Security provides all the features for implementing security at different

y
levels for users and groups and has in-built security groups and rights, which can be extended and
customized.

op
Workflow Management Security Features
The following are the features of Workflow Management security:
 Predefined security groups: Provide access rights to roles or users. Users also can
Create a Security Group, if required. Users mapped to a group can only view the items or
folders related to their work inside the list.
 Predefined rights: For example, Can Consume Item, Can Manage Item, and Can Create


Item.

C
Mainly three levels where security can be applied: Repository Level, List Level, and
ListItem Level. The List level security allows you to secure the access to various lists
available in a Workflow Management Repository. The ListItem level security settings allow
you to secure the access to various items available in a list.
Secure the Process Designer: Provide security to its elements as described below:
ot
 Provide security for each Category, Action, and Property to ensure that only the
authorized user can access each of these elements
 Provide security for each menu item to restrict the users for each action on the design;
for example, importing or exporting workflows, validating and publishing them,
settings, running the wizards, and test runs
 Secure the work items: Restrict whether a user can forward or kill work items, set an
N

alternate actor or preferences, view a resource calendar, and queue.


 Secure the queue: Restrict whether a user can view the queue control or add a new
queue.
 Secure the Calendar control: Restrict whether a user can view, add, and delete
Calendar.
o

The user can exclude options from the Enterprise Console menu, such as Inbox, Workflows,
Reports, Fill Form, Tools (Manage Forms, Manage List, and SOA Assembly), and Settings (User,
Calendar and Queue).
D

Resource Providers
Workflow Management works with the following providers:
 Repository User Provider: Workflow Management uses the concept of User Providers to
connect to users participating in the workflow process. User Providers are obtained from a
wide variety of User Data Sources, such as Active Directory or a native application-
specific application database. Workflow Management provides a default user database,
which is available in the User Provider options for a repository as a list.

Wonderware Training
Section 2 – Workflow Management Security 2-25

 Active Directory: When you select Active Directory as the Resource Provider, details
such as the Active Directory datasource and search base are populated by default.
Authentication User, Authentication Password, User Log-on ID, and User Log-on Display
Name are optional fields.
 Forms Provider: You can create a repository with Forms Provider for authentication. A
repository with Forms authentication implies that the user details are fetched from a user-
defined table. These details can be used for various purposes like login authentication into
the Enterprise Console and assigning actors to the human activities.

Create a User in Workflow Management

y
To create a user, you will first create a table named SqlUsers, after which you will insert the default
users, and then create a dll.

op
Create a Role in Workflow Management
The custom role entity provider fetches the role information from the SqlUsers table. The column
named Role in this table contains role information for a user.
The configuration below is mandatory for the Role Provider:


Identifier>).
C
The EntityIdentifierType method should always return a string, as the user entity provider
value type is always a string (for example, <Provider Instance Name>::<User Unique

The instance for User entity data source provider and Role entity data source provider
should be the same. The role provider does not exist by itself and is always mapped to a
user provider. The users returned by the role needs to be mapped to a user provider to be
ot
used within Workflow Management. As a result of this behavior, it is mandatory for the
providers to have the same instance name.
 The identifier type for Role provider is always a string as the Role name itself is
considered a unique identifier.

Create a Security Group


N

Use the New option to create custom security groups separate from the existing security groups. A
security group can be created only at the repository level.
To create a security group, log on to the Enterprise Console. Click Repository Settings. The
Repository Settings page appears. Click the Advanced Settings tab. Click Manage Security
Groups. The Security Groups page appears. On the action bar, click New. The Create Security
o

Group window appears.


You have two options to create a security group:
 New Security Group: Create a security group from scratch. This screen displays the
D

rights with default values. You can edit them and create a new security group.
 Copy From Existing Security Group: Create a security group by copying the rights from
an existing security group. You can customize this group later.

Create a New Security Group


To create a new security group, select New Security Group, and then click Continue. In the Title
field, enter a name for the security group, and in the Description field, enter a description for the
security group. In the Viewing Security Group Rights section, set the rights for the new security

Workflow Management 2019


2-26 Module 2 – Exploring Workflow Management Features

group. Click Save to assign rights to the security group. A message about successfully creating
the security group appears. Click OK to save the security group.

Copy from an Existing Security Group


To create a security group by copying an existing group, select Copy From Existing Security
Group. Select a security group in the drop-down list, and then click Continue. The new security
group will have the rights and predefined values of the selected security group. In the Title field,
enter a name for the security group, and in the Description field, enter a description for the security
group. In the Viewing Security Group Rights section, modify the value for the Rights and Follower-

y
specific value for the Rights, according to the requirements. Click Save to assign rights to the
security group. A message about successfully creating the security group appears. Click OK to
save the security group.

op
Creating a Resource Mapping
Use the New option to map roles or users to different security groups. If you map a role to a
security group, all the users of that role will have the right value defined. Mapping users allows you
to map an individual user to a specified security group.

Add a Role to a Security Group

C
To map a role to a security group, on the Security Group Mapping page, click New on the action
bar. The Security Group Resource Mapping page appears. Click the Map Roles tab to map the
selected role to a security group. In the Role Lookup field, enter the role, to map the selected role
to a security group. Use the Role Lookup window to search for the required role. In the Security
Group drop-down list, select the security group to map with the selected role. For example, select
Contributor in the Security Group drop-down list. In the Priority text box, enter the priority. For
ot
example, enter the priority as 4. Click Save to map the resource. The message Resource mapping
is saved successfully appears. Click OK. The selected role is mapped to the security group, and all
the rights of the group are applied.

Note: If the logged-in user belongs to multiple roles, the least priority will be considered.
N

Add a User to a Security Group


To map users to a security group, on the Security Group Mapping page, click New on the action
bar. The Security Group Resource Mapping page appears. Click the Map Users tab to map the
user to a security group. The Mapping: User to a Security Group page appears. In the User
Lookup field, enter the user to map the selected user to a security group. Use the User Lookup
o

window to search for the required role. In the Security Group drop-down list, select the security
group to map with the selected user. For example, select Limited Access. Click Save to map the
resource. The message Resource mapping is saved successfully appears. Click OK. The selected
user is mapped to the security group, and all the rights of the group are applied.
D

Note: The same user cannot be mapped with multiple security groups at the same level.

Wonderware Training
Lab 2 – Setting Up Permissions for Users 2-27

Lab 2 – Setting Up Permissions for Users

Introduction
In this lab, you will use the Enterprise Console to create users and user roles in the workflow
repository for the fictional ABC Plastics Plant. The plant has operators, supervisors, maintenance
engineers, and managers who are participating in the workflow process. Employees in different
departments have different roles, so you will also create security groups and add users and roles
to the security groups.You will create the security groups using existing security groups as a base.

y
In Lab 1, you used the admin user account for the administrator role. This admin user is created by
default when you create a repository using Repository User Provider. This user belongs to the
Administrator security group.

op
Objectives
Upon completion of this lab, you will be able to:
 Add new users
 Create a new user role
Create a security group


Add a user in a security group
Add a role in a security group
C
ot
N
o
D

Workflow Management 2019


2-28 Module 2 – Exploring Workflow Management Features

Add New Users and Roles


First, you will use the Enterprise Console to create authorized users for the Workflow
Management repository. When you create the users, you will specify their roles: safety officers,
cleaners, engineers, supervisors, operators, and schedulers.
1. On the Enterprise Console login page, in the User Name and Password fields, enter admin.

y
op
2. Click Login.
The Enterprise Console appears.
C
ot
3. At the top-left of the page, click the hamburger.

4. In the hamburger menu, click Settings , and then in the submenu, click Users .
N
o
D

Wonderware Training
Lab 2 – Setting Up Permissions for Users 2-29

The Users page appears with the existing admin user.

5. At the top-left of the page, click New .

y
6. In the Actors dialog box, in the Name field, enter Frank.

op
7. In the Password field, enter Frank.
8. In the Description field, enter Safety Officer 1.
9. In the Email field, enter Frank@training.com.
10. In the Department field, enter Safety.
11. In the Manager field, click the drop-down list and select admin.

C
12. In the Role field, enter Safety Officers.
ot
N
o
D

Workflow Management 2019


2-30 Module 2 – Exploring Workflow Management Features

13. Click Save to create the user.


A message appears confirming that the user was saved successfully.

y
14. Click Close.
The user Frank has been added to the list of users.

op
15. Repeat Steps 5 to 14 to create the following users:

Name

Alex

Marisa
Password Description

Alex

Marisa
C
Email
Safety Officers
Safety Officer 2 Alex@training.com

Safety Officer 3 Marisa@training.com


Department

Safety

Safety
Manager Role

admin

admin
Safety
Officers
Safety
ot
Officers
Cleaners
Cesar Cesar Cleaning Cesar@training.com Cleaning admin Cleaners
Crew 1
Charlee Charlee Cleaning Charlee@training.com Cleaning admin Cleaners
Crew 2
N

Rob Rob Cleaning Rob@training.com Cleaning admin Cleaners


Crew 3
Engineers
Ray Ray Maintenance Ray@training.com Maintenance admin Engineers
Engineer 1
Kevin Kevin Maintenance Kevin@training.com Maintenance admin Engineers
o

Engineer 2
Peter Peter Maintenance Peter@training.com Maintenance admin Engineers
Engineer 3
Janet Janet Maintenance Janet@training.com Maintenance admin Engineers
D

Engineer 4
Supervisors
Lenny Lenny Supervisor 1 Lenny@training.com Plant admin Supervisors
Management
Harry Harry Supervisor 2 Harry@training.com Plant admin Supervisors
Management
Jimmy Jimmy Supervisor 3 Jimmy@training.com Plant admin Supervisors
Management

Wonderware Training
Lab 2 – Setting Up Permissions for Users 2-31

Name Password Description Email Department Manager Role


Garry Garry Supervisor 4 Garry@training.com Plant admin Supervisors
Management
Operators
Joe Joe Operator 1 Joe@training.com Production admin Operators
Bob Bob Operator 2 Bob@training.com Production admin Operators
Sam Sam Operator 3 Sam@training.com Production admin Operators
Ben Ben Operator 4 Ben@training.com Production admin Operators
Scheduler

y
Robert Robert Scheduler Robert@training.com Scheduling admin Scheduler

The users are listed by Title, which is the name of the user.

op
C
ot
N
o
D

Workflow Management 2019


2-32 Module 2 – Exploring Workflow Management Features

Create Security Groups


Now, you will create security groups. You will use existing groups to create your groups.
16. On the Users page, at the top-right of the page, ensure the admin user is logged in.
You must be an administrator user to create security groups.
17. Click the admin user, and then click Repository Settings.

y
op
18. On the Repository Settings page, click the Advanced Settings tab.
19. In the right pane, click Manage Security Groups.

C
ot

The Security Group page appears with four default security groups. You will use these
N

groups as a base to create your groups, instead of creating your groups from the beginning
each time.
o
D

You will create two security groups: Plant Operators from the Contributor security group and
Plant Supervisors from the Administrator security group.

20. To create a new security group, at the top-left of the page, click New .
21. In the Create Security Group window that appears, in the right pane, click Copy From
Existing Security Group.

Wonderware Training
Lab 2 – Setting Up Permissions for Users 2-33

This action will open a Select a Security Group area.

y
22. In the right pane, click the Select drop-down list and select Contributor.

op
23. Click Continue.

C
24. In the Title field, enter Plant Operators as the name of the group.
25. In the Description field, enter Plant Operators Security Groups.
ot
N

At the bottom of the window, you can see this group’s security rights. Typically, you would
specify the rights you want this user to have by checking and unchecking the check boxes, but
you will accept the default settings.
o
D

Workflow Management 2019


2-34 Module 2 – Exploring Workflow Management Features

26. Click Save.


A message appears confirming that the security group was created successfully.

y
27. Click Close.

28. On the Security Group page, click New .

op
29. In the Create Security Group window that appears, in the right pane, click Copy From
Existing Security Group.
30. In the Select a Security Group area, in the right pane, click the Select drop-down list and
select Administrator.

C
ot
31. Click Continue.
32. In the Title field, enter Plant Supervisors as the name of the group.
N

33. In the Description field, enter Plant Supervisors Security Groups.


o
D

Wonderware Training
Lab 2 – Setting Up Permissions for Users 2-35

34. Scroll down to Queue Control Rights and uncheck Can Add New Queue and Manage
Queues.

y
op
35. Scroll down to Workflow List Rights and uncheck the following:
 Can Create BAM Workflow
 Can Create FileWatcher Workflow

C
Can Create Workflow for Microsoft InfoPath
Can Create Workflow for Microsoft SharePoint
ot
N
o

This group should only be able to create a List workflow and design a workflow.
36. Click Save.
D

A message appears confirming that the security group was created successfully.

37. Click Close.

Workflow Management 2019


2-36 Module 2 – Exploring Workflow Management Features

Add Users and Roles to Security Groups


Now, you will add users and roles to the security groups you created.
38. On the Security Group page, at the top-right of the page, click the admin user, and then click
Repository Settings.

y
op
39. On the Repository Settings page, click the Advanced Settings tab.
40. In the left pane, click Manage Security Group - Resource Mapping.

C
The Security Group Mapping page appears with two security groups. Notice that the admin
ot
user is a part of the Administrator group.
N

You can map roles or users to a security group.

41. Click New .


The Security Group Resource Mapping window appears.
o
D

You will now search for a role.

Wonderware Training
Lab 2 – Setting Up Permissions for Users 2-37

42. On the Map Roles tab, in the Role Lookup field, click the Role Lookup button to open the
Role Lookup window.

y
op
43. In the Search field, enter Operators and click Search.
The name appears in the Available Roles area.

44. Select the name and click the right arrow button to move the Operators role to the
Selected Role area.

C
ot
N

45. Click Update.


The Security Group Resource Mapping window reappears with the specified role added to
the Role Lookup field.
46. In the Security Group drop-down list, select Plant Operators.
o
D

Workflow Management 2019


2-38 Module 2 – Exploring Workflow Management Features

47. Leave Priority with the default setting of 100.

y
op
You use the Priority option to set the priority for this role because some users belong to
multiple roles. Each role must have a different priority.
48. Click Save.
A message appears confirming that the resource mapping was saved successfully.

49. Click Close.


C
ot
The Security Group Mapping page reappears with the Plant Operators group added with
the Operators role.
N

50. Repeat Steps 41 - 46 to map Supervisors to the Plant Supervisors security group.
o
D

Wonderware Training
Lab 2 – Setting Up Permissions for Users 2-39

51. Change Priority to 101.


You cannot use the same priority more than once.

y
op
52. Click Save.
A message appears confirming that the resource mapping was saved successfully.
53. Click Close.
The Security Group Mapping page reappears with the Plant Supervisors group added with
the Supervisors role.

54. Click New .


C
The Security Group Resource Mapping window appears.
You will now search for a user.
ot
55. Click the Map Users tab.
N
o

56. In the User Lookup field, click the User Lookup button to open the User Lookup window.
57. Repeat Steps 43 - 45 to find and add the user Rob.
The Security Group Resource Mapping window reappears with the specified user added to
D

the User Lookup field.

Workflow Management 2019


2-40 Module 2 – Exploring Workflow Management Features

58. In the Security Group drop-down list, select Contributor.

y
op
C
ot
59. Click Save.
A message appears confirming that the resource mapping was saved successfully.
N

60. Click Close.


o
D

Wonderware Training
Lab 2 – Setting Up Permissions for Users 2-41

The Security Group Mapping page reappears with the Contributor group added with the
user Rob. Also, notice the Plant Supervisors group with the role Supervisors, which you
added earlier.

y
op
C
ot
N
o
D

Workflow Management 2019


2-42 Module 2 – Exploring Workflow Management Features

y
op
C
ot
N
o
D

Wonderware Training
Section 3 – Working with Process Designer and Activities 2-43

Section 3 – Working with Process Designer


and Activities
This section introduces Process Designer. It discusses the Process Designer user interface,
specifically the menu bar’s Publish and Test Run command, the toolbar, design mosaic, Workflow
Management activities, and Activity Properties. It also describes the Workflow Management
Human Activities category.

y
Workflow Management Process Designer
The Process Designer provides an interface to design workflow processes. Workflows also can be

op
deployed using the Process Designer.
You can secure the Process Designer by controlling the access to categories, actions, properties,
and menus.
Enterprise Console\Process Designer\Workflow Management Workflow Activities:

C
ot
N
o
D

Workflow Management 2019


2-44 Module 2 – Exploring Workflow Management Features

Enterprise Console\Process Designer\Design Mosaic:

y
op
 The design mosaic appears in the center of the designer control.
 Actions can be dragged and dropped onto the design mosaic and different actions can be
linked together to define the flow of the process.

C
ot
N
o
D

 The Activity Properties window appears on the right corner of the designer control.
 Every workflow activity will have a specific set of properties to configure how it performs its
operation.
 Properties for every activity are set in the Actions.xml configuration file.
 Links that are displayed in the designer control also have properties based on the activity
from which they are linked.

Wonderware Training
Section 3 – Working with Process Designer and Activities 2-45

Enterprise Console\Process Designer\Data Computation:


Variables
 The Workflow Management Process design control provides activities that allow
computation of data.
The computed data can be stored in a variable.
 The stored value in the variable can be used in the Process Designer.
 The Process Designer allows the creation of variables.
Expression Editor

y
 The Expression Editor is another option provided by Workflow Management to build
complex data expressions using the advantages of the C# programming language.
Enterprise Console/Process Designer

op
 Methods of Adding Activities to the Process:
 Drag and drop an activity from the Activity toolbar to the design mosaic.
 Right-click an activity in the Activity toolbar and select the option in the menu.
 Insert an activity between two linked activities in the design mosaic.
 Copy an activity in the design mosaic and paste.
 Methods to link activities:


C
Select an activity in the design mosaic and point the mouse to the center. A square
box appears. Drag the mouse pointer and drop it on the destination activity.
Click the Link tool on the toolbar.
Select an activity to be linked in the design mosaic. Right-click an activity in the
Activity toolbar and select the mode of association to the activity in the design mosaic.
ot
 Design mosaic right-click menu options:
 Right-click an activity in the design mosaic.
 Right-click the linking line in the design mosaic.
 Right-click the design mosaic.
 Action Property window:
N

 Right-click an activity in the design mosaic and select the Activity Properties menu
option.
 Other options:
 To change the background, foreground, and gradient color, right-click an activity in the
design mosaic.
 To change the line thickness and color of the linking lines, right-click a link line.
o

 To realign activities in the design mosaic, drag and drop the activities in the design
mosaic.
 To delete an activity in the design mosaic, right-click the activity and select the Delete
D

option. This also deletes the associated link lines.


 To delete a link line, right-click the link line and select the Delete option.

Workflow Management 2019


2-46 Module 2 – Exploring Workflow Management Features

Process Designer User Interface


The Process Designer provides the interface to model workflow processes. Workflows can be
modeled, designed, and deployed from this window. The Process Designer control is opened from
a web form in the web application.
The Process Designer is an AJAX-based ASP.NET server control that can be embedded in any
web-based product, ASP Engine, or web page. It is a browser-based application that requires no
plug-in or IDE. It provides a comprehensive set of standard activities, which can be easily dragged
and dropped on a design mosaic and linked to design processes.
The Process Designer user interface has the following parts:

y
 Menu bar
 Toolbar

op
 Design mosaic
 Activities
 Activity Properties
The following image shows the Process Designer window:

C
ot
N

The Process Designer will be discussed throughout this manual. In this section, the following
components will be described:
 Menu Bar
 Publish and Test Run
 Toolbar
o

 Design Mosaic
 Workflow Management Activities
 Activity Properties
D

Wonderware Training
Section 3 – Working with Process Designer and Activities 2-47

Menu Bar
The following image shows the menu bar of the Process Designer window:

The menu bar has the following menus.

File
The File menu has the following options for files that have saved workflow process designs:

y
op
 Save As EMF Image: Save the current process design as an image file in the Enhanced
Windows Metafile (EMF) format. This is the ideal format for printing the process or to
embed it in MS Office files.
 Save As PNG Image: Save the current process design as a PNG image file.

Edit

C
Clear Diagram: Clear the current process design from the design area.

The Edit menu has the following options to perform various activities on the workflow process
design:
ot
N

 Undo: Undo the last action.


 Redo: Redo the last action.
o

 Delete: Delete the selected activity.


 Copy: Copy the selected activity.
 Paste: Paste the activity copied using the Copy command.
D

 Activity Properties: Open the Activity Properties window to set the properties for the
selected activity.

Workflow Management 2019


2-48 Module 2 – Exploring Workflow Management Features

Publish
A workflow is deployed and activated only if it is published.

 Publish: Publish the workflow design.


 Validate Definition: Validate the workflow definition.

y
Tools
The Tools menu has the following options to export and import workflow definitions:

op


Designer.

C
Import: Import process definition XML files, which were exported earlier, into the Process

Export: Export a workflow definition to an XML file. The exported definition can be
manually edited or moved to another database.
Import from Visio: Import a workflow process model XML file created using IT Pearls
BPMN Stencil for Visio.
ot
Settings
The Settings menu has the following options to configure different process level settings for other
Workflow Management Controls:
N
o

 Workitem Fields: Add and configure the work item fields.


 Alternate Actors: Specify alternate actors to the actual assigned actors.
 BAM Configuration: Set up critical performance measurement criteria for a workflow.
D

 WorkItemList Layout: Display all the work item fields that have been added.

Wonderware Training
Section 3 – Working with Process Designer and Activities 2-49

Publish and Test Run


You can view a workflow when it is being published and test run. The workflow runs only if it is
associated with events. To view the execution of the published workflow, select and right-click a
workflow, and then click Publish and Test Run. The Process execution view appears.

Note: If the workflow has any Microsoft SharePoint activity in it, ensure that the configuration
properties like SiteUrl, List/Library Name, and List Item are specified before publishing and
executing the workflow. These configuration properties are required before Test Run because of
the unavailability of Microsoft SharePoint workflow-event context.

y
Toolbar

op
The toolbar is located just below the menu bar at the top of the Process Designer window. It has
the following tools:
Undo

C
Undo the previous actions that were performed in the Process Designer.
Redo
ot
Repeat the previous actions that were performed in the Process Designer.
Delete

Delete an activity from the workflow.


N

Copy

Copy an activity in a workflow to paste it elsewhere.


o

Paste
D

Paste a cut or copied activity in the workflow.


Activities Toolbox

Show or hide the Activities Toolbox (Workflow Management activities), which has the list of
activities.

Workflow Management 2019


2-50 Module 2 – Exploring Workflow Management Features

Activity Properties

Show or hide the properties area for the selected activity.


Edit Text

Edit the text corresponding to the selected element on the design mosaic. It could be an activity or

y
a link.
Show Grid

op
Show or hide the grid pattern on the design mosaic.
Search

C
Search for a specific value in the workflow. You can enter the value to be searched in the field and
click the magnifying glass button next to it to start the search.
Zoom
ot
Zoom in or out on the workflow design in the design mosaic. You can do this by specifying the
percentage of zoom using the Zoom Level drop-down list in the window that opens. You can also
use this image to navigate through the process diagram.
See Using the Process Map Image for Navigation.
This feature is browser-dependent. FireFox is not supported.
N

Link

Create a new link between two activities. You can do this by specifying the two activities to be
linked in the window that appears.
o

Wizards
D

Create and define workflows easily.


Help

Access help content for the Process Designer and its elements.

Wonderware Training
Section 3 – Working with Process Designer and Activities 2-51

Design Mosaic
You can create and edit workflows in the design mosaic. Initially, it displays only the symbol for the
Start activity. You can click and drag different activities from the list of activities to the design
mosaic. This will display the symbols corresponding to the selected activities on the design
mosaic. These activity symbols can be connected to each other.
A splitter has been provided on the left side of the design mosaic. You can click this splitter to hide
the Activities pane and enlarge the design mosaic. The following image shows the Process
Designer with the splitter clicked to enlarge the design area:

y
op
C
ot
Workflow Management .NET Activities
N
o
D

You can use the Workflow Management activities area to access the different activities that can be
used to design the workflow process in the Process Designer. There are several activities
organized under different groups, which you can access in the drop-down list. These correspond
to the standard workflow activities available with Workflow Management.

Workflow Management 2019


2-52 Module 2 – Exploring Workflow Management Features

Human Activities

y
op
C
ot
When this option is selected in the drop-down list, it displays all the activities in this group, which
can be used to enable human workflow interaction. These activities include Approval, Check-List,
Choice, InfoPath Task, Invoke Form, Resource Set, Information, Task, and Work.
For a detailed description of the Human Activities, check the links below:
Activity Name Web Link
N

Approval http://sun.skelta.com/index.htm#approvalaction1
Checklist http://sun.skelta.com/index.htm#checklistaction1
Choice http://sun.skelta.com/index.htm#choiceaction1
Information http://sun.skelta.com/index.htm#information1
Invoke Form http://sun.skelta.com/index.htm#invokeformactivity
o

Resource Set http://sun.skelta.com/index.htm#resourcesetaction


Task http://sun.skelta.com/index.htm#taskaction1
D

Work http://sun.skelta.com/index.htm#workaction1
InfoPath Task http://sun.skelta.com/index.htm#infopathactivity

Wonderware Training
Section 3 – Working with Process Designer and Activities 2-53

Integration Activities

y
op
C
ot
This option displays the activities that can be used to integrate workflows with external
applications, scripts, and databases. Activities include COM-Object, Create-Open-Office-
Document, Invoke Web API, InvokeWebService, Script, Shell, File Operations, SOA Execute,
N

Change Workflow Status, and XML Action.


For a detailed description of the Integration Activities, check the links below:
Activity Name Web Link
Create-Open-Office-Document http://sun.skelta.com/index.htm#createofficedocument
o

Invoke Web API http://sun.skelta.com/index.htm#invokewebapiactivity


InvokeWebService http://sun.skelta.com/index.htm#invokewebservice1
Script http://sun.skelta.com/index.htm#script12
D

File Operations http://sun.skelta.com/index.htm#skeltafilesystemaction1


Change Workflow Status http://sun.skelta.com/#statuschangeaction1
XML Action http://sun.skelta.com/index.htm#xmlaction1

Workflow Management 2019


2-54 Module 2 – Exploring Workflow Management Features

Engine Activities

y
op
C
ot
N
o
D

This option displays the workflow-engine-related activities. These include End Activity Execution,
End Child Workflow, BlockingOutput, Database Activity, Decision, ForEach-Loop, For-Loop,
Logger, Next-Loop, Resource Variable, Rule, Set Workflow output variable, Synchronize, Update
Parent Variables, Update Variable, Workflow, and Xml Navigator.

Wonderware Training
Section 3 – Working with Process Designer and Activities 2-55

For a detailed description of the Engine Activities, check the links below:
Activity Name Web Link
End Activity Execution http://sun.skelta.com/index.htm#abortruntimeactivity1
End Child Workflow Execution http://sun.skelta.com/
index.htm#abortchildworkflowexecutionactivity
BlockingOutput http://sun.skelta.com/#blockoutputactivity
Database http://sun.skelta.com/#databaseactivity

y
Decision http://sun.skelta.com/index.htm#decisionactivity
ForEach-Loop http://sun.skelta.com/index.htm#foreachloopactivity
For-Loop http://sun.skelta.com/index.htm#forloop

op
Logger http://sun.skelta.com/index.htm#logger11
Loop Execution Step Entry http://sun.skelta.com/index.htm#loopexecutionstepentryactivity1
Next Loop http://sun.skelta.com/#nextloop
Resource Variable http://sun.skelta.com/index.htm#resourcevariable
Rule http://sun.skelta.com/index.htm#rule1
Set Workflow Output Variable
Synchronize
Update Parent Variables
Update Variable
C
http://sun.skelta.com/index.htm#setworkflowoutputvariable
http://sun.skelta.com/index.htm#synchronizeaction
http://sun.skelta.com/index.htm#updateparentvariables
http://sun.skelta.com/index.htm#updatevariablevalueaction
ot
Workflow http://sun.skelta.com/index.htm#workflowaction
XML Navigator http://sun.skelta.com/index.htm#xmlnavigator
N
o
D

Workflow Management 2019


2-56 Module 2 – Exploring Workflow Management Features

Scheduler, Communication, and BPMN Elements


The images below show the Scheduler and Communication activities and BPMN elements:

y
op
C
ot
Scheduler Activities
This option displays the activities that can be used to schedule other workflow activities. These
include Control Custom Timer, Set Custom Timer, Scheduler, and Time Trigger.
For a detailed description of the Scheduler Activities, check the links below:
N

Activity Name Web Link


Control Custom Timer http://sun.skelta.com/index.htm#customtimercontroller11
Set Custom Timer http://sun.skelta.com/index.htm#customtimerset11
Scheduler http://sun.skelta.com/index.htm#scheduler1
o

Time Trigger http://sun.skelta.com/index.htm#timertriggeraction1

Communication Activities
D

This option displays the activities that can be used to enable communication from the workflows.
These activities include Email, Notification, Send SMS, Wait for Email, Wait for SMS, and Work
Task Push Notification.

Wonderware Training
Section 3 – Working with Process Designer and Activities 2-57

For a detailed description of the Communication Activities, check the links below:
Activity Name Web Link
Email http://sun.skelta.com/index.htm#emailaction1
Notification http://sun.skelta.com/index.htm#notificationaction1
Work Tasks Pro Push
Notification http://sun.skelta.com/index.htm#WorkTasksPushNotification
Send SMS http://sun.skelta.com/index.htm#sendsmsaction1

y
Wait for Email http://sun.skelta.com/index.htm#waitforemailaction1
Wait for SMS http://sun.skelta.com/index.htm#waitforsmsaction1

op
BPMN Elements
This option displays the different BPMN elements available in Workflow Management. These
activities include Gateway Placeholder, Group Box, Intermediate Event Placeholder, Lane,
Placeholder, and Pool.
For a detailed description of the BPMN Elements, check the links below:
Activity Name Web Link
Gateway Placeholder
Group Box
Intermediate Event Placeholder
Lane
C
http://sun.skelta.com/index.htm#gatewayplaceholder1
http://sun.skelta.com/index.htm#groupbox1
http://sun.skelta.com/index.htm#intermediateeventplaceholder1
http://sun.skelta.com/index.htm#lane1
ot
Placeholder http://sun.skelta.com/index.htm#placeholder1
Pool http://sun.skelta.com/index.htm#pool1

List Activities
This option displays the activities that can be used to change the scope of the Xml List XML
N

variable during workflow execution. These activities include List Navigator and Wait For Event.
o
D

Activity Name Web Link


List Navigator Activity http://sun.skelta.com/index.htm#XmlListNavigatorActivity
Wait for Event Activity http://sun.skelta.com/index.htm#WaitForEventActivity

Workflow Management 2019


2-58 Module 2 – Exploring Workflow Management Features

Microsoft SharePoint Activities


This option displays the activities that can be used for Microsoft SharePoint. These include
Associate Workflow to Microsoft SharePoint Event, Create Content Type, Create Group, Create
List, Create Site, Create View, Delete Group, Delete List, Delete Site, Delete View, List Navigator,
List Operations, Move Copy Item, Permissions, Group Users, Update List, Update View, and Wait
for Microsoft SharePoint Event.

y
op
C
ot
N

Activity Name Web Link


Associate Workflow to Microsoft
SharePoint Event http://sun.skelta.com/
#AssociateWorkflowToSharePointEvent
o

Create Content Type Event http://sun.skelta.com/#createcontenttypeactivity11


Create Group http://sun.skelta.com/#creategroupactivity
D

Create List http://sun.skelta.com/#createlistactivity1


Create Site http://sun.skelta.com/#createsiteactivity1
Create View http://sun.skelta.com/#createviewactivity1
Delete Group http://sun.skelta.com/#deletegroupactivity1
Delete List http://sun.skelta.com/#deletelistactivity1
Delete Site http://sun.skelta.com/index.htm#deletesite21
Delete View http://sun.skelta.com/#deleteviewactivity1

Wonderware Training
Section 3 – Working with Process Designer and Activities 2-59

Activity Name Web Link


List Navigator http://sun.skelta.com/#listnavigatoractivity1
List Operations http://sun.skelta.com/#listoperationsactivity1
Move Copy Item http://sun.skelta.com/#movecopyitemactivity1
Permissions http://sun.skelta.com/#permissionactivity1
Group Users http://sun.skelta.com/#groupuseractivity1
Update List http://sun.skelta.com/#updatelistactivity1

y
Update View http://sun.skelta.com/#updateviewactivity1
Wait for Microsoft
SharePoint Event http://sun.skelta.com/#waitforsharepointeventactivity1

op
Security
This option displays the activities that can be used for security. These include Cancel Approval
Workflow and Security Instruction Handler.

C
ot
Activity Name Web Link
Cancel Approval Workflow http://sun.skelta.com/index.htm#cancelapprovalworkflow1_2
Security Instruction Handler http://sun.skelta.com/index.htm#cancelapprovalworkflow1_3
N

Report Activities
You use the Report Generator activity to run a report template and save the report in the Reports
list.
o
D

Activity Name Web Link


Report Generator http://sun.skelta.com/index.htm#reportgeneratoractivity1

Workflow Management 2019


2-60 Module 2 – Exploring Workflow Management Features

SAP Activities
This option displays the activities that can be used to enable the Workflow Management workflow
process design to read tables and run SAP functional modules activities. These include:
BAPI_RFC Execute and SAPTable Navigator.

y
op
Activity Name Web Link
BAPI_RFC Execute http://sun.skelta.com/index.htm#bapi_rfcexecute
SAPTable Navigator http://sun.skelta.com/index.htm#saptablenavigatoractivity

ArchestrA Events
Use the ArchestrA Wait for Event activity to wait for events from the ArchestrA Event Services

C
platform for a particular time period, and then consume the events in a defined workflow. You can
set the number of events and the time period in the properties of that activity. It can store the event
context details in specified XML variables.
ot
Activity Name Web Link
ArchestrA Wait for Event http://sun.skelta.com/index.htm#ArchestrAWaitforEvent
N
o
D

Wonderware Training
Section 3 – Working with Process Designer and Activities 2-61

Activity Properties
The Activity Properties pane at the right of the screen shows the property fields corresponding to
the selected Activity. The image below shows the Activity Properties for the Approval activity:

y
op
C
ot
Process Execution View
The Process execution views show the workflow execution status graphically. You can view the
N

execution view window by double-clicking a top level row in any of the reports. The View
represents the workflow up to the activity or execution status where the View was opened.
The Process execution views are very useful in navigating through large process definitions. You
can click any activity in the View window to open the process definition in the Process Designer.

Note: A green circle, with a white check mark superimposed, is used to denote a completed
o

activity or process. It is displayed on the top edge of the activity symbol for all completed activities.
This button is displayed at the top right corner of the page on the title bar to denote a completed
process.
D

There are three tabs to navigate between the following three views:
 Analyst's View
 Progress View
 Process execution view

Workflow Management 2019


2-62 Module 2 – Exploring Workflow Management Features

Analyst's View
The Analyst's View is a simplified view of the process design intended for users. It shows the
process model that was saved as the Business Analyst's View after the business process
modeling was completed and before the automation steps were added in the Process Designer. At
this stage, the model would have been saved to a file. This file should be assigned to the Analyst's
Process Model Filename for Execution View property of the Start activity to enable this view. To
display the Analyst's View, double-click the first row, which is highlighted below.

y
op
C
ot
N
o
D

Wonderware Training
Section 3 – Working with Process Designer and Activities 2-63

When you hover the cursor over a workflow activity on the Process execution view screen, it
shows the Action Details, Best Time, Slow Time, and Avg Time taken by the activity for a workflow
instance, as shown below:

y
op
Progress View
C
ot
The Progress View shows the workflow progress on the Process Diagram up to the point that the
execution view is selected. It consists of the execution view mapped on the Process Diagram. You
can click a completed activity to view the Step Details Window. You can view the step details,
variables, contents, and content (raw content passed to the workflow) using the corresponding
tabs. The links that have already been completed are represented by thick lines.
N
o
D

Workflow Management 2019


2-64 Module 2 – Exploring Workflow Management Features

Execution View
The Execution View shows the workflow execution status up to the point that the execution view is
selected.

y
op
When you click the Approval activity, the Details page appears and displays the Step Details of the
activity. The details screen shows information on the following five tabs: Step Details, Variables,
Contents, Content, and Submitted Form Details.
On the Step Details tab, you can view all the details related to the Approval activity, such as the
time of the action, type of action, name of the actor to whom this action has been assigned, and
the action performed by the actor.

C
ot
N
o
D

Wonderware Training
Section 3 – Working with Process Designer and Activities 2-65

When you click the Variables tab, the screen showing the details of all the variables used in this
activity appears. You can view the runtime values of the XML variable by clicking the Click to view
link.

y
op
C
When you click the Contents tab, the contents specified in the activity appears. The Contents are
the data that can be passed to the workflow while calling Client. Execute API as an XML. They
have to be declared in the Start activity along with the Xpath expression.
The raw format of the information given in the Contents tab is displayed on the Content tab.
When you click the Content tab, the data that will be passed to the workflow while calling
ot
Client.Execute API as an XML is displayed.
N
o
D

Workflow Management 2019


2-66 Module 2 – Exploring Workflow Management Features

y
op
C
ot
N
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-67

Lab 3 – Creating a Workflow Management


Workflow

Introduction
In this lab, you will use the Workflow Management Central Configuration site to create a workflow.
You will design the workflow with Approval and Information activities from the Human Activities
category. You will configure the Approval activity to send tasks to users to approve or reject the

y
activity and configure the Information activity to inform other users when the activity is approved or
rejected. You will then use the Publish and Test Run feature to run the workflow and will approve
and reject the activities as different users.

op
Objectives
Upon completion of this lab, you will be able to:
 Create a workflow with Approval and Information activities from the Human Activities
category
 Configure the Approval activity
 Use the Information activity

C
ot
N
o
D

Workflow Management 2019


2-68 Module 2 – Exploring Workflow Management Features

Create a Workflow
First, you will use the Enterprise Console to create a workflow for the fictional ABC Plastics Plant
to track one of its machines.

Note: If you leave the Workflow Management software unattended for 25 minutes, you will
be logged out because of the configuration you did in Lab 1 in the Auto Log Off Settings
area. You will have to log in to the Enterprise Console again.

1. If necessary, on the Enterprise Console log in page, log in with the User Name and

y
Password of admin.
The logged in page for the administrator appears, as indicated by the admin user at the top-
right of the page.

op
2. At the top-left of the window, click the hamburger to see all the menu options available to
administrator.
3. Click Workflows.

C
ot
N
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-69

The Workflows page appears.


4. Click New.

y
op
C
A toolbar appears with several workflow types.
5. Click Workflow to create a standard workflow.
ot
N
o
D

Workflow Management 2019


2-70 Module 2 – Exploring Workflow Management Features

The New Workflow window appears.


6. In the Title field, enter Lab3.
7. In the Description field, enter Creating a Workflow Management (formerly Skelta)
Workflow.

y
op
8. Click Save & Continue.
C
A message appears confirming that the workflow was created successfully.
ot
N

9. Click Close.
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-71

The Workflow Options window appears.


10. In the right pane, ensure Design the Workflow now is selected.

y
op
11. Click Finish.
C
The Workflows page reappears. At the top-right of the page, a pop-up blocker symbol
ot
may appear if this is the first time you opened this page.
N
o

12. Click the symbol to open the message, and then click the option to always allow pop-ups from
this site.
D

13. Click Done.

Workflow Management 2019


2-72 Module 2 – Exploring Workflow Management Features

14. If the workflow you created does not appear, press F5 on your keyboard to refresh the page.
The new workflow appears in the list.

y
15. Select the workflow, and then on the toolbar at the top of the page, click Design .

op
You may also select the workflow, and then right-click and select Design Workflow.

C
After a few moments, the Process Designer appears with Human Activities displayed in the
ot
Activities drop-down list in the left pane and the Start activity displayed in the right pane on
the design mosaic.
N
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-73

Other activities are available on the Activities drop-down list, but you will use Human
Activities now. At the top-right of the window, TrainingRepository / Lab3 / 1 is visible, which
represents the repository name/workflow name/version of the workflow.
Now, you will design the following workflow. You will add Approval and Information activities to
the workflow. You will specify which users are sent the tasks for approval and which users are
informed when the tasks are approved or rejected. Design your workflow to look like the workflow
below as you follow the steps.

y
op
C
Note: When you add activities to your workflow, they will have numbers, which will increase
with each additional copy of the activity added (for example, Information3 or Approval5).
Your numbers may differ from those shown in this manual if you added additional copies of the
ot
activities to your workflow besides those mentioned in the steps. Use the numbers shown in
this manual to identify the activity being addressed even if yours has a different number.

16. With Human Activities selected in the Activities pane, drag the Approval activity to the right
of the Start activity on the design mosaic.
N

When you release the mouse, the activity appears as Approval1.


o

The red circle with the white exclamation mark indicates the activity needs to be configured.
You will configure the activities later.
17. Click the Start activity and point the mouse to the center of the activity.
D

A red box appears around the Start activity and a square appears in the middle of the activity.

Workflow Management 2019


2-74 Module 2 – Exploring Workflow Management Features

18. Click the square in the middle of the activity and drag the mouse pointer from the middle of the
Start activity to the Approval1 activity.
A red box appears around the Approval1 activity.

19. Release the mouse when the red box appears around the Approval1 activity.

y
A line will link the activities.

op
activities.

C
20. Repeat Steps 16 to 19 to add another Approval activity to the right of Approval1 and link the

The new activity will be named Approval2.


ot
N
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-75

21. With Human Activities selected in the Activities pane, drag the Information activity below
the top line and between the Approval1 and Approval2 activities.
The activity will be named Information1.

y
op
C
22. Right-click the linking line between Approval1 and Approval2 and select Approved.
ot
N
o
D

Workflow Management 2019


2-76 Module 2 – Exploring Workflow Management Features

The Approved label is added.


23. Click Approval1 and point the mouse to the center of the activity.
24. When the red box appears, drag the mouse pointer to Information1 to link the activities.
A line will link the activities.

y
op
C
25. Right-click the linking line between Approval1 and Information1 and select Rejected.
The Rejected label is added.
ot
N
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-77

26. Drag another Information activity to the right of Approval2.


The activity will be named Information2.

y
op
27. Link Approval2 and Information2, and then right-click the linking line and select Approved.
The Approved label is added.

C
ot
N
o
D

Workflow Management 2019


2-78 Module 2 – Exploring Workflow Management Features

28. Add a linking line between Approval2 and Information1, and then right-click the linking line
and select Rejected.
The Rejected label is added.

y
op
Configure the Activities

C
Next, you will configure the activities for approval, rejection, and notification.
29. Click Approval1, and then right-click and select Activity Properties.
ot
N

You can also use the gear button on the toolbar at the top-left of the window.
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-79

The Activity Properties pane appears on the right.

y
op
C
30. In the Activity Properties pane, expand Name & Description.
31. In the Name field, replace Approval1 with MaintenanceApproval.
32. At the bottom of the pane, click Save to see how the name changes in the workflow.
ot
This save is only to show you which area is affected by this change.
N
o
D

Workflow Management 2019


2-80 Module 2 – Exploring Workflow Management Features

33. Expand Name & Description, and in the Description field, enter Maintenance Engineer
Approval.
34. Click Save to see where the description is added in bold text in the workflow.
This save is only to show you which area is affected by this change.

y
op
35. In the Actors area, under the Assign Actor(s) property, click the gray button to the right of the
field.

C
ot
The Assign Actor(s) window appears.
36. In the middle of the window, click the User option.
N
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-81

37. In the User Lookup window, in the Search For field, enter Ray and confirm the SK User
Name is selected in the drop-down list.
38. Click Search.
The name Ray appears in the Available Resources area.

39. Select the name and click the right arrow button to move the user to the Selected
Resources area.

y
op
C
ot

40. Click Update.


N

The Assign Actor(s) window reappears with the SK User ID added at the bottom-left of the
window.
o
D

If you do not want to select a user by the User ID, you can clear it. You will do that next.

Workflow Management 2019


2-82 Module 2 – Exploring Workflow Management Features

41. Click Clear to clear the SK User ID.

y
op
42. In the middle of the window, click the Filter Condition option.
43. On the left of the window, click the ‘(’ drop-down list and select SK User Name.

C
44. Leave the default settings for the next two drop-down lists, and then in the last field, enter Ray.
ot
N
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-83

45. Click Add.


[SK User Name] = [“Ray”] appears in the middle of the window on the left.

y
op
46. Click Update.

C
The Assign Actor(s) field in the Activity Properties pane updates with [SK User Name] =.
ot

47. In the workflow, click Approval2, and then in the Activity Properties pane, expand Name &
N

Description.
48. In the Name field, replace Approval2 with ProductionSupervisorApproval.
49. In the Description field, enter Plant Production Supervisor Approval.
o
D

Workflow Management 2019


2-84 Module 2 – Exploring Workflow Management Features

50. In the Actors area, under the Assign Actor(s) property, click the gray button to the right of the
field.

y
op
51. In the middle of the Assign Actor(s) window, ensure the Filter Condition option is selected.
52. On the left of the window, click the ‘(’ drop-down list and select SK User Name.
53. Leave the default settings for the next two drop-down lists, and then in the last field, enter
Lenny.
54. Click Add.

C
[SK User Name] = [“Lenny”] appears at the middle of the Assign Actor(s) window on the
left.
ot
N
o

55. Click Update.


The Assign Actor(s) field in the Activity Properties pane updates with [SK User Name] =.
D

56. Click Save.

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-85

The Approval2 activity is updated.

y
57. Repeat Steps 47 to 54 to configure Information1 as follows:

Name: NotifyOperator

op
Description: Notify Operator About Rejection
Assign Actor(s): Joe (Joe is Operator 1)

C
ot
N

58. Click Update.


The Assign Actor(s) field in the Activity Properties pane updates with [SK User Name] =.
o
D

59. Click Save.

Workflow Management 2019


2-86 Module 2 – Exploring Workflow Management Features

The Information1 activity is updated.

y
op
60. Repeat Steps 47 to 54 to configure Information2 as follows:

Name: NotifyScheduler
Description: Notify Scheduler About Maintenance
Assign Actor(s): Robert (Robert is the Scheduler)

C
ot
N
o

61. Click Update.


The Assign Actor(s) field in the Activity Properties pane updates with [SK User Name] =.
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-87

62. Click Save.


The Information2 activity is updated.

y
op
Publish and Test Run
Next, you will test the workflow. When a machine stops working, a value will change, maybe to
zero, which will trigger the workflow. However, because you do not have the real-life situation, you
will trigger the workflow manually.

C
63. In the menu bar, click Publish and Test Run.
ot
N
o
D

Workflow Management 2019


2-88 Module 2 – Exploring Workflow Management Features

The Process execution view appears with the Analyst’s View selected.

64. Click the Refresh button to update the page if it does not appear as shown below.

The check mark on the Start activity indicates that this workflow activity has been run
successfully. The green line indicates that the notification has been sent to the next person to
act. The wait symbol on the first Approval activity indicates that this activity is awaiting an
action before it can proceed.

y
op
C
ot
65. Double-click the Approval activity named MaintenanceApproval.
A window with details appears.
N

66. Review the content and note that an approval request has been sent to Ray, who is next in the
workflow process.
o
D

67. Click the close button at the top-right of the window.

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-89

Now, you will log out as admin and log in as Ray to see the approval request.
68. At the top-right of the page, click admin, and then click Log Out.

y
The Enterprise Console login page appears.
69. In the User Name and Password fields, enter Ray.

op
C
ot

70. Click Login.


N

The logged in page for Ray appears, as indicated by Ray at the top-right of the page. Ray is a
member of a limited access security group, so he can only see the dashboard and Inbox, as
shown on the left.
The task is listed in the Work items list. If it is not listed, wait a few moments or press F5 to
refresh the screen. Under Priority, note the color of the circle. Yellow is a task. Green is a
notification.
o
D

71. Click the task.


72. Allow the pop-ups, if necessary.

Workflow Management 2019


2-90 Module 2 – Exploring Workflow Management Features

The WorkItem Detail View appears with the Approve and Reject buttons at the bottom-right
of the window.

y
op
73. Click Approve.
C
The WorkItem Detail View closes and the task is removed from the Work items list because
ot
the required action for this user has been completed. The task has been sent to the supervisor
Lenny.
N
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-91

Now, you will log out as Ray and log in as Lenny to see the approval request.
74. At the top-right of the page, click Ray, and then click Log Out.

75. On the Enterprise Console login page, repeat Steps 69 and 70 to log in as Lenny with the

y
user name and password Lenny.
The logged in page for Lenny appears, as indicated by Lenny at the top-right of the page.
Lenny is a supervisor, so he has access to more information, as shown on the left and bottom

op
of the page. The task is listed in the Work items list.

C
ot
N

76. Click the task.


o
D

Workflow Management 2019


2-92 Module 2 – Exploring Workflow Management Features

The WorkItem Detail View appears with the Approve and Reject buttons at the bottom-right
of the window.

y
op
77. Click Approve.
C
The WorkItem Detail View closes and the task is removed from the Work items list because
ot
the required action for this user has been completed. The task has been sent to the scheduler
Robert.
N
o

Now, you will log out as Lenny and log in as Robert to see the notification.
78. At the top-right of the page, click Lenny, and then click Log Out.
D

79. On the Enterprise Console login page, repeat Steps 69 and 70 to log in as Robert with the
user name and password Robert.

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-93

The logged in page for Robert appears, as indicated by Robert at the top-right of the page.
Robert is a limited user, so he can only see the dashboard and Inbox. The notification is listed
in the Work items list.

y
80. Click the notification.

op
The WorkItem Detail View appears with the Remove Item button at the bottom of the
window.

C
ot
N
o

81. Click Remove Item.


You can remove the item because it was only a notification about the activity and only
provided information. It will not require further action.
D

Workflow Management 2019


2-94 Module 2 – Exploring Workflow Management Features

The WorkItem Detail View closes and the task is removed from the Work items list.

y
op
Now, you will check the status of the workflow. The users in the Administrator and Contributor
groups have rights to see the progress of the workflow by accessing the Report menu.

A page for the reports appears. C


82. Log out as Robert and log in as admin with the user name and password admin.

83. In the hamburger menu, click Reports .

84. In the Global Reports pane, under Analyze, expand Execution.


ot
N
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-95

85. Click the Completed status.


The Lab3 workflow appears in the right pane.

y
op
86. Double-click the workflow.
The Process execution view appears with the Analyst’s View tab selected.

C
ot
N
o

The check mark indicates that those activities have been run successfully. No tasks were
rejected, so there are no symbols on the Rejected activity.
This workflow is complete so the final status is displayed. However, if you check the status
D

while the workflow is in progress and click Executing or Awaiting, you will have to click the
Refresh button to update the status as users may be performing various activities
elsewhere.

Workflow Management 2019


2-96 Module 2 – Exploring Workflow Management Features

Reject a Task
Next, you will reject a task to see the process in the workflow. You will have to unpublish the
workflow first.

87. In the admin user’s Enterprise Console, in the hamburger menu, click Workflows .
Notice that the Lab3 workflow’s Item Status shows Published.

y
op
C
88. Click the workflow, and then on the toolbar at the top-right of the page, click Unpublish
A message appears confirming that the workflow was unpublished successfully.
.
ot
89. Click Close.
N

90. With the workflow selected, on the toolbar at the top-right of the page, click Design .
Process Designer appears with the Lab3 workflow.
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-97

91. Click Publish and Test Run.


The Process execution view appears with the Analyst’s View showing the Approval activity
named MaintenanceApproval is awaiting action.

y
op
C
ot
92. Double-click the MaintenanceApproval activity and in the Step Details, note that Ray needs
to take action.
N
o
D

93. Close the window.


94. In the admin user’s Enterprise Console, log out as admin.

Workflow Management 2019


2-98 Module 2 – Exploring Workflow Management Features

95. Log in to the Enterprise Console as Ray with the user name and password Ray.
The task is listed in the Work items list.

y
96. Click the task.

op
The WorkItem Detail View appears with the Approve and Reject buttons at the bottom-right
of the window.

C
ot
N
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-99

97. Click Reject.


The WorkItem Detail View closes and the task is removed from the Work items list because
the required action for this user has been completed. The task has been sent to the operator
Joe.

y
op
Next, you will confirm that the NotifyOperator task has been completed.
98. Log out as Ray and log in as admin with the user name and password admin.

A page for the reports appears.

C
99. In the hamburger menu, click Reports .

100.In the Global Reports pane, under Analyze, expand Execution.


ot
N
o
D

Workflow Management 2019


2-100 Module 2 – Exploring Workflow Management Features

101.Click the Completed status.


The Lab3 workflow appears in the right pane with two listings for Lab3.

y
op
102.Fully expand the top item to see the activities created up to this point.
Notice that the NotifyOperator task has been completed.

C
ot
N
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-101

103.Double-click the top item.


The Process execution view appears with the Analyst’s View tab selected.

104.Click the Refresh button to update the window if it does not appear as shown below with
the NotifyOperator task completed.

y
op
C
ot
105.Log out of the Enterprise Console as admin and log in as Joe with the user name and
password Joe.
The notification is listed in the Work items list.
N
o
D

Workflow Management 2019


2-102 Module 2 – Exploring Workflow Management Features

106.Click the notification.


The WorkItem Detail View appears with the Remove Item button at the bottom of the
window.

y
op
107.Click Remove Item.

C
The WorkItem Detail View closes and the listing is removed from the Work items list
because it was only a notification about the activity and only provided information.
ot
N
o
D

Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-103

108.Use the Reports menu to check the completed status in the Process execution view.

y
op
C
ot
N
o
D

Workflow Management 2019


2-104 Module 2 – Exploring Workflow Management Features

y
op
C
ot
N
o
D

Wonderware Training
Lab 4 – Exporting and Importing a Workflow 2-105

Lab 4 – Exporting and Importing a Workflow

Introduction
In this lab, you will export the Lab 3 workflow you created earlier, and then import the exported
workflow to use as a starting point when creating a new workflow. After you import the workflow,
you can modify it by adding and removing components to create a new workflow.

y
Objectives
Upon completion of this lab, you will be able to:
Export a Workflow

op

 Import a Workflow

C
ot
N
o
D

Workflow Management 2019


2-106 Module 2 – Exploring Workflow Management Features

Export a Workflow
First, you will back up Lab3 by exporting the workflow, so that you can use it as a base for the
workflow you will create.
1. Log out as Joe and log in as the admin user with the user name and password admin.
2. In the Enterprise Console, go to the Workflows page.
The Lab3 workflow should still be in Published mode from the last lab. You must first
unpublish it to change it to draft mode.

y
3. Select the Lab3 workflow, and on the toolbar at the top-right of the page, click Unpublish.

op
A message appears confirming that the workflow was unpublished successfully.

C
ot
4. Click Close.

5. With the workflow selected, on the toolbar at the top-right of the page, click Design .
Process Designer appears with the Lab3 workflow.
N
o
D

Wonderware Training
Lab 4 – Exporting and Importing a Workflow 2-107

6. In the menu bar, hover over Tools.


Notice the Import and Export commands.
7. Click Export.

y
The file is exported, as indicated by the XML file at the bottom-left of the page.

op
C
ot
N

8. Right-click the file and select Show in Folder.


o
D

The location of the file appears. Google Chrome exports files to the Downloads folder by
default.

Workflow Management 2019


2-108 Module 2 – Exploring Workflow Management Features

9. Copy the file, and then navigate to the C:\Training folder and paste it.

y
You can also export a workflow without first opening the workflow. Select the workflow, and
then right-click and select Export Workflow.

op
Import a Workflow
Next, you will create a new workflow and import the exported Lab3 workflow.
10. Switch to the Workflows page and click New.
A toolbar appears with several workflow types.
11. Click Workflow to create a standard workflow.

C
ot
N
o
D

Wonderware Training
Lab 4 – Exporting and Importing a Workflow 2-109

The New Workflow window appears.


12. In the Title field, enter Lab4.
13. In the Description field, enter Exporting and Importing a Workflow.

y
op
14. Click Save & Continue.
C
ot
A message appears confirming that the workflow was created successfully.
N

15. Click Close.


o
D

Workflow Management 2019


2-110 Module 2 – Exploring Workflow Management Features

The Workflow Options window appears.


16. In the right pane, ensure Design the Workflow now is selected.

y
op
17. Click Finish. C
The Process Designer appears with Human Activities displayed in the Activities drop-
down list in the left pane and the Start activity displayed in the right pane on the design
ot
mosaic.
N
o
D

Wonderware Training
Lab 4 – Exporting and Importing a Workflow 2-111

18. In the menu bar, hover over Tools.


19. Click Import.

y
The Workflow Management Import Process Definition dialog box appears.

op
C
20. Click the Choose File button, and navigate to C:\Training.
21. Click the Lab3_1.xml file.
ot
N
o

22. Click Open.


D

Workflow Management 2019


2-112 Module 2 – Exploring Workflow Management Features

The file path populates the field.

y
23. Click Import.

op
The imported Lab3 workflow appears in the Lab4 file.

C
ot
This lab was to show you how to export and import a file because you will be exporting and
importing in the following labs.
N
o
D

Wonderware Training
Section 4 – Working with Variables 2-113

Section 4 – Working with Variables


This section discusses the Workflow Management variables: Variable, Content variable, and XML
variable. It also explains how to declare a variable.

Using Variables in a Workflow


Workflow Management supports storage types that are mainly categorized as Variables, Contents,
and XmlVariables.

y
Start Activity
The Start activity is the first activity in a workflow. The symbol corresponding to this activity is

op
displayed by default in the Design Area. The variables and contents used in the execution of the
workflow are declared here. The Start activity has to be configured by specifying appropriate
values for the different properties in the Activity Properties area. Click the Activity Properties tool in
the toolbar or right-click the Start activity, and then click Activity Properties.

Variables

C
You can set the workflow variables in the Variables property window. To open this dialog box and
declare the variable, click the button in the Variables property.
ot
N
o
D

Workflow Management 2019


2-114 Module 2 – Exploring Workflow Management Features

The Variables dialog box appears with a grid, which has a blank row where you can enter the
parameters for a new variable.
The dialog box has two tabs at the top to manage the rows of variables in the grid:
 Add Row: Click to add the newly entered variable and display a new row on the grid
where you can add another variable
 Remove Selected: Click to remove the selected variable in the grid
The grid has the following parameters that you need to specify for the new variable:
 Workflow Variables: Use to enter the variable name; prefix the variable name with @ if it
is a local variable

y
 Type: Use the drop-down list to select the data type for the variable
The drop-down list displays the following data types: string, number, date, array, actor,

op
object, boolean, float, and decimal.

C
ot
N

There are two buttons and a check box at the bottom of the dialog box:
 Update: Save the newly added variables
 Close: Close the property window without saving the newly added variables
 Last Row needs to be added: Save the last row added
o

Contents
You can set the workflow contents in the Contents property window. To open this dialog box, click
the button in the Contents property. The Contents dialog box appears with a grid, which has a
D

blank row where you can enter the parameters for a new content.
The dialog box has two tabs at the top to manage the rows of contents in the grid:
 Add Row: Click to add the newly entered content and display a new row on the grid where
you can add another content
 Remove Selected: Click to remove the selected content row in the grid

Wonderware Training
Section 4 – Working with Variables 2-115

The grid has the following parameters that you need to specify for the new content:
 Content Description: Use to enter the content description
 Type: Use the drop-down list to select the data type for the variable
The drop-down list displays the following data types: string, number, date, array, actor,
object, boolean, float, and decimal.
 XPath Expression: Enter the XPath expression for the content
 Attribute Name Blank for InnerString: Enter the attribute name to get the XML attribute
(optional); if left blank, it will retrieve the XML value

y
There are two buttons and a check box at the bottom of the dialog box.
 Update: Save the newly added contents
 Close: Close the property window without saving the newly added contents

op
 Last Row needs to be added: Save the last row added

XML Variables
Workflow Management uses XML variables to provide data input to workflows. XML variables can
be configured in the Start activity through the XMLVariables property.
The following table lists the different types of XML variables:

XML Variable
XML Document
XML Iterator
SP InfoPath Form
Description

C
Fetches the required items
Allows you to define variables for repeating XML elements and attributes
Allows workflows to access information in the InfoPath form, which is published to
a Microsoft SharePoint form library
ot
XML List Fetches the data from any list
XML List Iterator Iterates through the list items (parent items) of a list and helps to retrieve or update
data from a workflow
SP List/DocLibrary Fetches the data from any Microsoft SharePoint library or lists
XML SAPTable Stores the SAP table information
XMLForms Data Grid Reads or modifies the selections of a Data Grid control used in forms or lists
N

The XML Variable Interface defines:


 XML schema for the XML variable, either by specifying the complete schema or loading
an XML Document or InfoPath form, which is the source of the schema
 XSL transforms for the defined variable
Variables of type XML Document to retrieve data from XML files
o

 Variables of type SP List/DocLibrary to create variables that map to Microsoft SharePoint


libraries or lists
 Variables of type SP InfoPath Form to create variables that map to InfoPath forms within a
D

Microsoft SharePoint library


 Variables of type XML Iterator to retrieve data within repeating nodes within an XML
schema
The XML Iterator represents a collection of XML nodes at some level in the XML variable
schema. It allows you to perform actions on XML nodes, such as looping through XML
nodes and getting the value of a specific node at any location.

Workflow Management 2019


2-116 Module 2 – Exploring Workflow Management Features

 Variables of type XML Forms Data Grid to retrieve or modify selections of Data Grid
Control used within forms or lists that map with the Grid Configuration for the selected
XML node of the form

Note: Special characters, such as < > { } * ? [ ] ( ) - _ , = | ; ` +, and % are allowed while naming
the XML node of XML variables. XMLVariable will not support XML node names with special
characters, such as \, ~, !, ', :, ", #, `, &, ., @, ^, and $. You should not use Microsoft SharePoint
sites that have List or Site Column names with any of these special characters.

y
op
C
ot
N
o
D

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-117

Lab 5 – Using Human Activities with


Variables in a Workflow

Introduction
In this lab, you will declare a variable, use Choice activity, configure Task activity, configure
common properties in Human Activities, use existing variables in activities, and send an Approval/
Rejection notification. The common properties in Human Activities you will configure include Name

y
and Description, Configuration, and Actors. These activities will be done for the fictional ABC
Plastics Plant, where there is a chemical spill in the production area, which requires a workflow
that includes checking for missing equipment and reporting on the size of the spill.

op
Objectives
Upon completion of this lab, you will be able to:
 Declare a variable
 Use Choice activity
Configure Task activity

C
Configure common properties in Human Activities
Use existing variables in activities
ot
N
o
D

Workflow Management 2019


2-118 Module 2 – Exploring Workflow Management Features

Create a Workflow
First, you will declare a variable. However, before you declare a variable, you must create a
workflow. This workflow you will create is for chemical spills at the fictional ABC Plastics Plant. A
spill will trigger the workflow, which includes all the notifications and actions that are required by
various staff members.
1. In the Enterprise Console, ensure you are logged in as the admin user.

2. In the left pane, in the hamburger menu, click Workflows .

y
The Workflows page appears.

op
3. Click New .

C
A toolbar appears with several workflow types.

4. Click Workflow to create a standard workflow.


The New Workflow window appears.
ot
5. In the Title field, enter Lab5.
6. In the Description field, enter Using Human Activities with Variables in a Workflow.
N
o
D

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-119

7. Click Save & Continue.


A message appears confirming that the workflow was created successfully.
8. Click Close.
The Workflow Options window appears.
9. In the right pane, ensure Design the Workflow now is selected.
10. Click Finish.
The Process Designer appears with Human Activities displayed in the Activities drop-

y
down list in the left pane and the Start activity displayed in the right pane on the design
mosaic. At the top-right of the window, TrainingRepository / Lab5 / 1 is visible, which
represents the repository name/workflow name/version of the workflow.

op
Declare a Variable
C
Now, you will declare a variable. The Start activity is the first activity in a workflow. The variables
ot
and contents used in the execution of the workflow are declared here. To declare a variable, you
use the Variables property window.
11. Click the Start activity, and then right-click and select Activity Properties.
You can also use the gear button on the toolbar.
N
o
D

Workflow Management 2019


2-120 Module 2 – Exploring Workflow Management Features

The Activity Properties pane appears on the right. The top three categories are Variables,
Contents, and XmlVariables. Any variables you create here are declared variables.
12. In the Configuration area, under the Variables property, click the gray button to the right of
the field.

y
op
The Variables window appears.
C
13. In the blank Workflow Variables field, enter AreasAffected.
ot
14. In the Type drop-down list, select string.
There are several data types available in this drop-down list.
N
o
D

15. At the top-left of the window, click Add Row .

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-121

A blank field is added below AreasAffected.


16. In the blank field, enter EstimatedSize.
17. In the Type drop-down list, select string.
18. Add another row as follows:

Workflow Variables: Reason


Type: string

y
op
Now, you will add a spill cycle.
C
19. Add and configure another row as follows:

Workflow Variables: SpillCycle


ot
Type: number
N
o
D

20. Click Update.

Workflow Management 2019


2-122 Module 2 – Exploring Workflow Management Features

You can also create XmlVariables. You will not create these variables now, but follow the next two
steps to see the configuration window.
21. Under XmlVariables, click the gray button to the right of the field.
The XmlVariables window appears with a default variable named SKEventData. The Type is
Xml Document. This variable is automatically created when you create a workflow. However,
for this lab, you will use the regular variables.

y
op
C
ot
22. Close the window.

Design a Workflow
N

Next, you will start to design the workflow shown below.


o
D

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-123

Note: If you leave your system unattended for a while, you will be logged out. If you are
logged out while designing a workflow, log in as admin, go to the Workflows page, and
double-click the workflow you were designing.

23. Drag the Start activity down a little on the design mosaic.
24. In the Human Activities pane, select a Choice activity and drag it to the design mosaic to the
right of the Start activity.

y
op
25. Click the Start activity.
C
A red square box appears around the Start activity.
26. Click the square in the middle of the activity and drag the mouse pointer from the middle of the
ot
Start activity to the Choice1 activity until a red box appears around the Choice1 activity.
N

27. Release the mouse.


A line will link the activities.
o
D

Note: To move an activity after it has been placed, click the activity, and then hold the mouse
button until a red box appears around the activity. Then, you can move it.

Workflow Management 2019


2-124 Module 2 – Exploring Workflow Management Features

28. With the Choice1 activity selected, in the Activity Properties pane, expand Name &
Description.
29. In the Name field, replace Choice1 with Notification Choice.
30. In the Description field, enter Notify operator or safety officer.

y
31. Click Save.

op
32. In the Configuration area, under the Action Outputs property, click the gray button to the
right of the field.

C
ot
The Action Outputs window appears. You will use this window to create buttons.
33. In the Button Name field, enter Notify Safety Officer.
N

34. In the Completion Maker drop-down list, select Yes.


o
D

Selecting Yes allows the text you entered to be displayed as a button in the window you use to
act on tasks in your Inbox. You will click this button to complete the task. When the task is
completed, it will disappear from your Inbox.

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-125

35. At the top-left of the window, click Add Row and enter the following:

Button Name: Notify Operator


Completion Maker: Yes

y
op
36. Click Update.

C
37. In the Actors area, under the Assign Actor(s) property, click the gray button to the right of the
field.
ot
N
o
D

Workflow Management 2019


2-126 Module 2 – Exploring Workflow Management Features

The Assign Actor(s) window appears.


38. At the top-right of the window, ensure the Filter Condition option is selected.
39. On the left of the window, click the ‘(’ drop-down list and select SK User Name.
40. Leave the default settings for the next two drop-down lists, and then in the last field, enter
Lenny.

y
op
41. Click Add.
C
[SK User Name] = [“Lenny”] appears at the middle of the Assign Actor(s) window on the
left.
ot
N
o
D

42. Click Update.

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-127

The Assign Actor(s) field in the Activity Properties pane updates.

43. Click Save.


Now, you will add and configure other activities on the workflow. The final result should look similar
to the following:

y
op
C
ot
N
o
D

Workflow Management 2019


2-128 Module 2 – Exploring Workflow Management Features

44. In the Human Activities pane, select a Task activity and drag it to the design mosaic as
shown below.
45. Link Notification Choice and Task1.
46. Adjust the line as shown below.
To adjust the connector on the line, click the line and hover over the square connector until the
cursor changes to a move pointer (four arrows), and then click and drag the red square to the
desired location. To adjust the line, click the line and hover over a square on the line until the
cursor changes to a resize pointer (vertical or horizontal double arrows), and then click and
drag the line to the desired location.

y
op
follows:

Name:
C
47. Right-click the top linking line and select Notify Safety Officer.
48. Select the Task1 activity, and in the Activity Properties pane, configure the activity as

Task Missing Safety Equipment


ot
Description: Missing Safety Equipment

49. Click Save.


N
o
D

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-129

50. Repeat Steps 37 to 41 to assign Frank to this activity in the Assign Actor(s) field.
Frank is the safety officer who can check for the safety equipment.

y
op
51. Click Update.
The Assign Actor(s) field in the Activity Properties pane updates.

52. Click Save.


C
ot
53. In the Configuration area, under the Select Task Type property, click the gray button to the
right of the drop-down list.
The Build Task Type window appears.
N
o
D

54. In the bottom area of the window, for No. of additional Task Types, leave the default number
1 and click Add New.

Workflow Management 2019


2-130 Module 2 – Exploring Workflow Management Features

55. Configure the task as follows:

Task Type: Missing Safety Equipment


No. of Status: 4

y
op
56. Click Next.

C
A window in which you will specify the missing equipment appears.
57. In the Missing Safety Equipment column, enter:
 Helmet
ot
 Gloves
 Glasses
 Nothing
58. Check the check box for each piece of equipment to enable the Task Completion Maker,
which will cause them to appear in the tasks as buttons to complete the actions.
N
o
D

59. Click Finish.

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-131

A window with the Task Types and Status you added appears.

y
op
60. Click Close.
The Add Task drop-down list has changed to Select Task and the task has been added to the
drop-down list.

C
61. In the Select Task drop-down list, select the task you added.
ot
62. Click Save.
63. In the Human Activities pane, select a Check-List activity and drag it to the design mosaic.
64. Add a right-angle linking line between the Notification Choice activity and the Check-List1
N

activity.
65. Right-click the bottom linking line and select Notify Operator.
66. Select the Check-List1 activity, and in the Activity Properties pane, configure the activity as
follows:

Name: Check-List on Spill


o

Description: Collect information on major spill


D

Workflow Management 2019


2-132 Module 2 – Exploring Workflow Management Features

67. Click Save.

y
op
68. Repeat Steps 37 to 41 to assign Joe to this task in the Assign Actor(s) field.
Joe is Operator1.

C
ot
N

69. Click Update.


The Assign Actor(s) field in the Activity Properties pane updates.
o
D

70. Click Save.

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-133

71. In the Configuration area, under the Questions property, click the gray button to the right of
the field.
The Checklist - Questions window appears.
72. At the bottom of the window, in the No. of additional questions field, enter 3.

y
op
73. Click Add New. C
ot
N
o
D

Workflow Management 2019


2-134 Module 2 – Exploring Workflow Management Features

74. Configure the checklist as follows:


!
Checklist-Question Answer Type/No. of Options Mandatory
(Decisionmaker)
What's the reason for textbox (default) 1 (checked)
the spill?
(default)
Which areas got checkbox 3 (checked)
affected?
What's the estimated dropdown 3 (checked) (checked)
size of the spill?

y
op
C
ot
75. Click Next.
N
o
D

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-135

Now, you will configure the checklist options. You will specify variables, which will store the
selected values.
76. Configure the options as follows:
Options Default Value Values
What's the reason for the spill?
Map question answer to variable Variable.Reason
Which areas got affected?
Conveyor Belt Belt

y
Floor Floor
Control Panel Panel
Map question answer to variable Variable.AreasAffected

op
What's the estimated size of the spill?
Small Low Risk
Medium High Risk
Large Emergency
Map question answer to variable Variable.EstimatedSize

C
ot
N
o
D

Workflow Management 2019


2-136 Module 2 – Exploring Workflow Management Features

77. Click Finish.


A window with the configured options appear.

y
op
78. Click Close.
79. Click Save.
80. Drag three Approval activities and three Information activities to the design mosaic as
shown below.

C
Note: The numbers with your activities may differ from those shown in this manual. Use the
numbers shown in this manual to identify the activity being addressed even if yours has a
different number.
ot
81. Add linking lines to connect them and label the lines as shown below:
N
o
D

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-137

82. Select the Approval1 activity, and in the Activity Properties pane, configure the activity as
follows:

Name: Approval Low Spill


Description: Cleaning Crew for Low Spill

83. Click Save.


84. Assign Cesar to this task in the Assign Actor(s) field.
Cesar is a part of Cleaning Crew 1.

y
85. Click Save.
86. Select the Approval2 activity, and in the Activity Properties pane, configure the activity as
follows:

op
Name: Approval Medium Spill
Description: Cleaning Crew for Medium Spill
Assign Actor(s): Charlee (Cleaning Crew 2)

87. Click Save.


88. Select the Approval3 activity, and in the Activity Properties pane, configure the activity as
follows:

Name:
Description:
Assign Actor(s):
C
Approval Hazardous Spill
Cleaning Crew for Emergency
Rob (Cleaning Crew 3)
ot
89. Click Save.
The workflow with the configured activities appears as follows:
N
o
D

Workflow Management 2019


2-138 Module 2 – Exploring Workflow Management Features

90. Select the Information1 activity, and in the Activity Properties pane, configure the activity as
follows:

Name: Notify Safety Officer on Spill


Description: Notification to send cleaning crew
Assign Actor(s): Alex (Safety Officer 2)

91. Click Save.


92. Select the Information2 activity, and in the Activity Properties pane, configure the activity as
follows:

y
Name: Notify Supervisor on Spill
Description: Notification of major spill

op
Assign Actor(s): Lenny (Supervisor 1)

93. Click Save.


94. Select the Information3 activity, and in the Activity Properties pane, configure the activity as
follows:

Name: Escalate to Supervisor on Incident


Description:
Assign Actor(s):

95. Click Save.


Lenny (Supervisor 1)

C
Notification that operator has not taken action

The workflow with the configured activities appears as follows:


ot
N
o
D

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-139

Publish and Test Run


Next, you will trigger the workflow manually.
96. In the menu bar, click Publish and Test Run.
The Process execution view appears with the Analyst’s View showing the Approval activity
named Notification Choice is awaiting action.

y
op
C
ot
97. Log out of the Enterprise Console as admin and log in as Lenny with the user name and
password Lenny.
The task is listed in the Work items list.
98. Click the task.
N
o
D

Workflow Management 2019


2-140 Module 2 – Exploring Workflow Management Features

The WorkItem Detail View appears with the Notify Operator and Notify Safety Officer
buttons at the bottom-right of the window.

y
op
99. Click Notify Safety Officer.
C
ot
The WorkItem Detail View closes and the task is removed from the Work items list because
the required action for this user has been completed. The task has been sent to the safety
officer Frank.
N

100.Log out as Lenny and log in as Frank with the user name and password Frank.
o

The task is listed in the Work items list.


101.Click the task.
D

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-141

The WorkItem Detail View appears with the Task Status drop-down list at the top-right of the
window.
The person notified will depend on which option you select. If you select Nothing, the Safety
Officer will be notified, but if you select Gloves, Glasses, or Helmet, the Supervisor will be
notified, as designed in the workflow.
102.In the Task Status drop-down list, select Helmet.

y
op
C
ot
103.Click Submit.
The WorkItem Detail View closes and the task is removed from the Work items list because
the required action for this user has been completed. The task has been sent to the supervisor
Lenny.
104.Log out as Frank and log in as Lenny.
N

Note: As you have noted, the user name and password for all user logins are the user’s
name (for example, Lenny/Lenny). Follow this standard for all future log ins.

The notification is listed in the Work items list.


The top portion of this workflow is complete.
o
D

Workflow Management 2019


2-142 Module 2 – Exploring Workflow Management Features

Lenny has rights to use the Reports menu because he is in the Supervisors group, which is
derived from the Administrator group, so he can check the status of the workflow.
105.In the Enterprise Console, use the Reports menu to check the Completed status in the
Process execution view.

y
op
C
ot
N

106.Close the Process execution view.


o

Now, you will unpublish the Lab5 workflow, which notified the safety officer as the Notification
Choice when it was run. You will then Publish and Test Run the same workflow again to check if
the Choice activity selects Notify operator as the Notification Choice. You can run a workflow
D

multiple time to check for different conditions.


107.In the Enterprise Console, in the Workflows list, select Lab5 and on the toolbar at the top-
right of the page, click Unpublish.
A message appears confirming that the workflow was unpublished successfully.
108.Click Close.

109.With the workflow selected, on the toolbar at the top-right of the page, click Design .

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-143

Process Designer appears with the Lab5 workflow.

y
op
110.Click Publish and Test Run.

C
The Analyst’s View appears with the Notification Choice activity awaiting action.
ot
N
o

111.In the Enterprise Console, click the Inbox.


D

The task is listed in the Work items list.


112.Click the top item in the list.

Workflow Management 2019


2-144 Module 2 – Exploring Workflow Management Features

The WorkItem Detail View appears with the Notify Operator and Notify Safety Officer
buttons at the bottom-right of the window.

y
op
113.Click Notify Operator.

Joe.
114.Log out as Lenny and log in as Joe.
C
The WorkItem Detail View closes and the task is removed from the Work items list because
the required action for this user has been completed. The task has been sent to the operator

The task is listed in the Work items list.


ot
115.Click the task.
N
o
D

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-145

The WorkItem Detail View appears with the Check-List items on the right.
116.In the What's the reason for the spill? field, enter High Speed.
117.In the Which areas got affected? area, check Conveyor Belt and Control Panel.
118.In the What’s the estimated size of the spill? drop-down list, select Large.

y
op
119.Click Submit.
C
The WorkItem Detail View closes and the task is removed from the Work items list because
ot
the required action for this user has been completed. The task has been sent to the cleaner
Rob.
120.Log out as Joe and log in as Rob.
The task is listed in the Work items list.
121.Click the task.
N
o
D

Workflow Management 2019


2-146 Module 2 – Exploring Workflow Management Features

The WorkItem Detail View appears with the Approve and Reject buttons at the bottom-right
of the window.

y
op
122.Click Approve.
The task is removed from the Work items list.
That is the last activity in the workflow.
C
ot
N
o
D

Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-147

Rob has rights to use the Reports menu because he is in the Contributor group, so he can check
the status of the workflow.
123.In the Enterprise Console, use the Reports menu to check the Completed status in the
Process execution view.

y
op
C
ot
N
o
D

Workflow Management 2019


2-148 Module 2 – Exploring Workflow Management Features

y
op
C
ot
N
o
D

Wonderware Training
Section 5 – Scheduler and Engine Activities 2-149

Section 5 – Scheduler and Engine Activities


This section explains the following scheduler activities: Scheduler, Time Trigger, and Set Custom
Timer. It also discusses the following engine activities: Rule, Decision, Update Variable, For-Each
Loop, and Database. In addition, it address how to initialize and read a variable.

Scheduler Activities
The following scheduler activities are discussed below: Scheduler, Time Trigger, and Set Custom

y
Timer.

Scheduler Activity

op
You can use the Scheduler activity to schedule a task at a specified time; the schedules can be
weekly, daily, and hourly. The output of the activity can be linked to the next activity. There is an
option to set the recurrence count.

Activity Properties
The Scheduler activity has to be configured by specifying appropriate values for the different

C
properties in the Activity Properties area. To access the Activity Properties, either click the Activity
Properties tool on the toolbar or select the appropriate option from the right-click menu for the
Scheduler activity.
ot
N
o

The Activity Properties are organized by groups of related properties. Each group is described
D

below.
Name & Description (Optional - set only if necessary)
 Name: Name for the activity
 Description: Brief description of the activity

Workflow Management 2019


2-150 Module 2 – Exploring Workflow Management Features

Configuration (Mandatory - must be set to run activity)


 Scheduler Details: Specify the time settings for the specific workflow activity
 To specify the Scheduler Details, click the button for the Scheduler Details property to
open the property window. Click one of the three tabs—Weekly, Time Span, and Date
Criteria—to set the corresponding property value. By default, the first tab, Weekly, is
selected and the corresponding user interface is shown. You can specify the weekly
schedule settings here. Select the day of the week on which the activity is to be
scheduled in the Time drop-down list. Specify the time at which the scheduled activity
should be run on the selected day in the hh:mm:ss field in the hh:mm:ss format. Click
the Recurring? check box to schedule the activity to recur. If it is to recur more than

y
once, specify the count in the Recurrence Factor/Count field. If the count is set to 0,
the activity keeps on recurring. If it is set to 2, the activity ends after the second
recurrence. If it is set to 1 or NO, the activity is only run once.

op
 Click the Time Span tab to display the corresponding user interface. You can specify a
time span for the execution of the activity here. Enter the time interval of the schedule
in the first field, in the d.hh:mm:ss format, where d denotes the number of days for
which the schedule is set, while the time setting denotes the number of hours,
minutes, or seconds. For example, if this value is set as 0.00:30:00, the activity will be
run every 30 minutes. If it is set as 1.00:30:00, the activity will be run every 1 day and
30 minutes or 24 hours and 30 minutes. Click the Recurring? check box to schedule
the activity to recur. If it is to recur more than once, specify the count in the


Recurrence Factor/Count field.

C
Click the Date Criteria tab to display the corresponding user interface. You can specify
a date-based schedule here using Content or Variable collection or by entering
discrete values. After specifying the value, you must select one of two options—
Initiate before or Initiate after—in the next drop-down list and specify the time interval
in number of days.
ot
 After making all the schedule settings, click Update to save the settings.
 Output Path: Specify the output path that can be used to link to the next activity and can
be treated as the output of the Scheduler activity
 Activity outputs: The Scheduler activity does not have a standard return value. It will
output the value specified in the Output Path property.
N

Exception Behavior
Each activity has the Raise error on unhandled linked output property; when clicked, it shows
all the default configured mapped error outputs in red with their check boxes selected.
Looping Behavior (Optional - set only if necessary)
 Loop through this action if output is: Specify the condition for looping the activity
o

by selecting an activity output in the drop-down list.

Time Trigger Activity


D

You can use the Time Trigger activity to put workflow execution on hold. It is useful in ensuring the
execution of certain activities at specific times. Conditional routing can be performed for different
timeouts. Multiple nonrecurring timeouts can be scheduled using this activity.

Wonderware Training
Section 5 – Scheduler and Engine Activities 2-151

Activity Properties
The Time Trigger activity has to be configured by specifying appropriate values for the different
properties in the Activity Properties area. To access the Activity Properties, either click the Activity
Properties tool on the toolbar or select the appropriate option from the right-click menu for the
Time Trigger activity.

y
op
below. C
The Activity Properties are organized by groups of related properties. Each group is described

Name & Description (Optional - set only if necessary)


ot
 Name: Name for the activity
 Description: Brief description of the activity
Configuration (Mandatory - must be set to run activity)
 Timer Trigger: Specify the timeouts for triggering activities in the workflow; this will induce
a delay in the execution of the affected activities
N

 To specify the Timer Trigger, click the button for the Timer Trigger property to open the
property window. Enter the time interval for the timer trigger in the Time Interval field.
Specify the output of this activity in the Output field. After entering the details, click
Add Row to add this timer trigger setting and display a new row. Remove rows, if
necessary, by selecting them and clicking Remove Selected. After setting the timer
trigger settings, click Update to save the settings.
 Activity outputs: The Time Trigger activity does not have a standard return value. It
o

will output the value specified in the Time Trigger property.


Exception Behavior
Each activity has the Raise error on unhandled linked output property; when clicked, it shows
D

all the default configured mapped error outputs in red with their check boxes selected.
Looping Behavior (Optional - set only if necessary)
 Loop through this action if output is: Specify the condition for looping the activity
by selecting an activity output in the drop-down list.

Workflow Management 2019


2-152 Module 2 – Exploring Workflow Management Features

Set Custom Timer Activity


You can use the Set Custom Timer activity to schedule multiple tasks to run at specified times,
using the corresponding workflow variable. The workflow variable with the format
^[CustomTimerSetActionName]ExecutionDetailsId is defined in the Start activity for each Set
Custom Timer activity used in the workflow. The scheduling can be made recurring or non-
recurring. The output of the activity can be linked to the next activity.

Activity Properties
The Set Custom Timer activity has to be configured by specifying appropriate values for the

y
different properties in the Activity Properties area. To access the Activity Properties, either click the
Activity Properties tool on the toolbar or select the appropriate option from the right-click menu for
the Set Custom Timer activity.

op
C
ot
The Activity Properties are organized by groups of related properties. Each group is described
below.
N

Name & Description (Optional - set only if necessary)


 Name: Name for the activity
 Description: Brief description of the activity
Configuration (Mandatory - must be set to run activity)
 Schedule Time: Specify the time setting for scheduling the specific workflow action
o

 To specify the Schedule Time, click the button for the Schedule Time property to open
the property window. Select the variable with the schedule time setting in the Variable
Description drop-down list. If the schedule is to recur, specify Yes in the Recurring?
drop-down list. Specify the output of this activity in the Output field. After entering the
D

details, click Add Row to add this schedule time setting and display a new row.
Remove rows, if necessary, by selecting them and clicking the Remove Selected
button. After setting the XML data to the variables, click Update.

Wonderware Training
Section 5 – Scheduler and Engine Activities 2-153

 Activity outputs: The Set Custom Timer activity returns the following values:
 Paused: The controlled activity is paused
 Resumed: The controlled activity is resumed
 Stopped: The controlled activity is stopped
In addition to these standard return values, it also returns the scheduled time as
output.
Exception Behavior
Each activity has the Raise error on unhandled linked output property; when clicked, it shows

y
all the default configured mapped error outputs in red with their check boxes selected.
Looping Behavior (Optional - set only if necessary)
 Loop through this action if output is: Specify the condition for looping the activity

op
by selecting an activity output in the drop-down list.

Engine Activities
The following engine activities are discussed below: Rule, Decision, Update Variable, For-Each
Loop, and Database.

Rule Activity

C
The Rule activity allows you to build complex rules or expressions into the workflow. The
expression will either result in true or false. The workflow engine evaluates the expression and
assigns the result (true/false) to the output. The engine determines the path of the workflow from
the output.
ot
Activity Properties
The Rule activity has to be configured by specifying appropriate values for the different properties
in the Activity Properties area. To access the Activity Properties, either click the Activity Properties
tool on the toolbar or select the appropriate option from the right-click menu for the Rule activity.
N
o
D

The Activity Properties are organized by groups of related properties. Each group is described
below.
Name & Description (Optional - set only if necessary)
 Name: Name for the activity
 Description: Brief description of the activity

Workflow Management 2019


2-154 Module 2 – Exploring Workflow Management Features

Configuration (Mandatory - must be set to run activity)


 Condition: Frame complex expressions for the workflow execution
The expression results either in true or false. The workflow engine, after evaluating the
expression and getting the result, decides on the path for the activity, according to the
process design.
 To specify the condition for the Rule activity, click the button for the Condition property
to open the property window. Build a complex expression for the rule using the fields
provided: Select a type of value (Variable, Content, or XMLVariables) in the first drop-
down list, and then select the corresponding value in the second drop-down list. This

y
forms the left side of the rule condition expression. Select the operator for the
condition in the third drop-down list. Select the type of value (Value, Variable, Content,
or XMLVariables) and the corresponding value for the property in the respective drop-
down lists to add the right side of the rule condition expression. Select End in the last

op
drop-down list to complete the expression. If you are building a compound expression,
you can select one of the logical operators to connect the different conditions that form
the expression. Add the condition to the expression by clicking Add. This will display
the expression in the text area. You can remove a condition already added to the
expression by clicking Undo. You can also clear an existing expression, if necessary,
by clicking Clear. This is useful if you want to clear large expressions in the text area
to build a new expression. After building the expression, click Update to save it.

Decision Activity
True: Rule condition is true

C
Activity outputs: The Rule activity returns the following values:

False: Rule condition is false


ot
You can use the Decision activity to insert a decision in the workflow. You can use the output of the
activity to determine the path of workflow execution.

Activity Properties
The Decision activity has to be configured by specifying appropriate values for the different
N

properties in the Activity Properties area. To access the Activity Properties, either click the Activity
Properties tool on the toolbar or select the appropriate option from the right-click menu for the
Decision activity.
o
D

Wonderware Training
Section 5 – Scheduler and Engine Activities 2-155

The Activity Properties are organized by groups of related properties. Each group is described
below.
Name & Description (Optional - set only if necessary)
 Name: Name for the activity
 Description: Brief description of the activity
Configuration (Mandatory - must be set to run activity)
 Decisions: Create complex rules to control the execution path of the workflow
In contrast to the Rule action, which only allowed a True/False type of decision, you can

y
use the Decision property for rules with multiple outputs based on the condition specified.
 Activity outputs: Output text for a given condition
Exception Behavior

op
Each activity has the Raise error on unhandled linked output property; when clicked, it shows
all the default configured mapped error outputs in red with their check boxes selected.

Update Variable Activity


You can use the Update Variable activity to update the value of Variables and XmlVariables that
you can use in subsequent activities. Using this activity, the variable for For-Loop activity can also
be initialized.

Activity Properties
C
The Update Variable activity has to be configured by specifying appropriate values for the different
properties in the Activity Properties area. To access the Activity Properties, either click the Activity
ot
Properties tool on the toolbar or select the appropriate option from the right-click menu for the
Update Variable activity.
N
o
D

The Activity Properties are organized by groups of related properties. Each group is described
below.
Name & Description (Optional - set only if necessary)
 Name: Name for the activity
 Description: Brief description of the activity

Workflow Management 2019


2-156 Module 2 – Exploring Workflow Management Features

Configuration (Mandatory - must be set to run activity)


 Set Variable: Specify the values for existing Variables or XMLVariables
 See Variables for updating Variables
 See Microsoft SharePoint XmlVariables to work with Microsoft SharePoint
XMLVariables
 See Forms XmlVariables to work with Forms XMLVariables
 Activity outputs: The Update Variable activity returns the following values:
 Updated: Displayed when the Variable or XMLVariable is updated
Not Updated: Displayed when the Variable or XMLVariable is not updated

y

Exception Behavior (Optional - set only if necessary)


Each activity has the Raise error on unhandled linked output property; when clicked, it shows

op
all the default configured mapped error outputs in red with their check boxes selected.
Looping Behavior (Optional - set only if necessary)
 Loop through this action if output is: Specify the condition for looping the activity
by selecting an activity output in the drop-down list.

Initialize and Read Variables

C
As soon as you create a variable, you have the option to initialize it, which means you can add
values to the variable.
ot
N
o
D

Wonderware Training
Section 5 – Scheduler and Engine Activities 2-157

You can update the variable values using the Update Variable activity, if needed. The supported
types for initialization are:
 Variables
 Content variables
 XML variables
When you use variables, at runtime, the variables are read and replaced with the appropriate
information.

For-Each-Loop Activity

y
The For-Each Loop Activity is used to loop an activity through a collection within an XMLIterator
Variable. It allows repeated execution of an activity or group of activities. It must always be used

op
along with the Next Loop Activity.

Activity Properties
The For-Each Loop Activity has to be configured by specifying appropriate values for the different
properties in the Activity Properties area. To access the Activity Properties, either click the Activity
Properties tool on the toolbar or select the appropriate option from the right-click menu for the For-
Each Loop Activity.

C
ot
N
o

The Activity Properties are organized by groups of related properties. Each group is described
below.
D

Name & Description (Optional - set only if necessary)


 Name: Name for the activity
 Description: Brief description of the activity

Workflow Management 2019


2-158 Module 2 – Exploring Workflow Management Features

Configuration (Mandatory - must be set to run activity)


 XMLIterator: Select the XML Iterator variable to be looped through
All XMLIterator variables as declared in Start activity are available for selection.
 Activity outputs: The For-Each Loop Activity returns the following values:
 Step: Displayed to indicate the loop step
 Loop End: Displayed when the end of the loop is reached
 Execution: Select Serial if the activity has to be looped through each item in a collection
in sequence

y
An activity will be created for an item only after completion of the activity for the preceding
item. Select Parallel to simultaneously create activities involving each item. This field
defaults to Serial.

op
Exception Behavior
Each activity has the Raise error on unhandled linked output property; when clicked, it shows
all the default configured mapped error outputs in red with their check boxes selected. By default,
is set as NO.
Looping Behavior (Optional - set only if necessary)
 Loop through this action if output is: Specify the condition for looping the activity

C
by selecting an activity output in the drop-down list.

Database Activity
The Database Activity enables you to run queries, stored procedures, and functions from the
workflow. The Database Activity establishes a connection with the database server and retrieves
or updates data in the database. The activity gives the schema of the database table to an XML
ot
variable according to the query, stored procedures, or functions passed.

Application Scenario
Consider a scenario where a manager wants to send approval forms to supervisors. The manager
can add the database activity with a query to select the email address column from the
N

Supervisors Database. The Output XML will have the schema based on the query and this XML
variable can be used to assign employees to whom the approval forms are to be sent. When the
workflow is initiated, the query in the database activity will be run and all the supervisors will
receive the approval forms in their Inboxes.

Note: When you are connecting to an Oracle database, it is recommended to use case-sensitive
commands based on the Oracle database settings, and also install Oracle Client on your machine.
o
D

Wonderware Training
Section 5 – Scheduler and Engine Activities 2-159

Activity Properties
The Database activity has to be configured by specifying appropriate values for the different
properties in the Activity Properties area. To access the Activity Properties, either click the Activity
Properties tool on the toolbar or select the appropriate option from the right-click menu for the
Database activity.

y
op
C
ot
Note: Every time you input a value for a property, save the data. Click the Save button on the
Activity Properties window. You need to save the property so that the subsequent properties in the
activity can inherit the required information.

Name & Description (Optional - set only if necessary)


 Name: Name for the activity
N

 Description: Brief description of the activity


Configuration (Mandatory - must be set to run activity)
 Database Connection: Get the connection to the Database Server
 You can use this property to select the Database connection (configured in Enterprise
Console/Settings/Database Connections).
o

 Query Builder: Use to set the following properties:


 Command Type
 Query
D

 Output XML variable


Exception Behavior
Each activity has the Raise error on unhandled linked output property; when clicked, it shows
all the default configured mapped error outputs in red with their check boxes selected.
Looping Behavior
 Loop through this action if output is: Specify the condition for looping the activity
by selecting an activity output in the drop-down list.

Workflow Management 2019


2-160 Module 2 – Exploring Workflow Management Features

y
op
C
ot
N
o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-161

Lab 6 – Using Decision Activity for


Conditional Checking

Introduction
In this lab, you will perform multiple conditional checks on variables, set custom outputs for
Decision activities, and set the Else condition. You will first import the Lab 5 workflow and remove
activities you do not need, and then add a Decision activity to check the condition of a spill—

y
whether it is a major or minor spill. For a minor spill, a notification will be sent to the operator. For a
major spill, the operator will be assigned the task to collect information using the Check-List
activity. The operator will send the approval task to a qualified cleaning crew based on the spill

op
level (Low Risk, High Risk, Emergency). The cleaning crew will approve and reject the tasks
based on the spill level and send notifications to the supervisor. You will also initialize a variable
and read the name of the workflow initiator using an inbuild variable.

Objectives
Upon completion of this lab, you will be able to:


Set the Else condition
Initialize a variable
Read a variable value
C
Perform conditional check on a variable
Set custom output for Decision activity
ot
N
o
D

Workflow Management 2019


2-162 Module 2 – Exploring Workflow Management Features

Export and Import a Workflow


First, you will export the Lab5 workflow, so that you can use it as a base for the workflow you will
create.
1. In the Enterprise Console, log in as admin.
2. Unpublish the Lab5 workflow, open it in the Process Designer, and export it to the
C:\Training folder.
See Lab 4 in this manual if you need help exporting the file.

y
Next, you will create a new workflow and import the exported Lab5 workflow.
3. Close the Lab5 workflow.

op
4. On the Workflows page, click New .
A toolbar appears with several workflow types.

5. Click Workflow to create a standard workflow.


The New Workflow window appears.
6. In the Title field, enter Lab6.

C
7. In the Description field, enter Using Decision Activity for Conditional Checking.
ot
N
o
D

8. Click Save & Continue.


A message appears confirming that the workflow was created successfully.
9. Click Close.
The Workflow Options window appears.
10. In the right pane, confirm Design the Workflow now is selected.
11. Click Finish.

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-163

The Process Designer appears with Human Activities displayed in the Activities drop-
down list in the left pane and the Start activity displayed in the right pane on the design
mosaic.
Note that at the top-right of the window, TrainingRepository / Lab6 / 1 is visible, which
represents the repository name/workflow name/version of the workflow.

y
op
12. In the menu bar, hover over Tools and click Import.

C
The Import Workflow Management Process Definition dialog box appears.
ot
N

13. Click the Choose File button, navigate to C:\Training and select the Lab5_1.xml file.
o
D

Workflow Management 2019


2-164 Module 2 – Exploring Workflow Management Features

14. Click Open.


The file path will populate the field.

y
op
15. Click Import.
The imported Lab5 workflow appears in the Lab6 file

C
ot
N
o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-165

Configure the Workflow


Now, you will edit the workflow you imported. The finished workflow should look similar to the
workflow shown below.

y
op
C
You will first remove the activities you do not need in this workflow and add a Decision activity.
16. At the top of the Lab6 workflow in the middle, select the Task activity named Task Missing
Safety Equipment.
ot
17. At the top-left of the window, on the toolbar, click the Trash button.
N
o

The activity and its linking lines disappear.


D

Workflow Management 2019


2-166 Module 2 – Exploring Workflow Management Features

18. Repeat Steps 16 and 17 to delete the Information activity named Escalate to Supervisor on
Incident.

y
op
C
ot
N

19. Move up the Information activity named Notify Safety Officer on Spill as shown below:
o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-167

20. In the Activities drop-down list in the left pane, select Engine Activities.

y
op
The Engine Activities appear in the left pane.
21. On the left of the workflow, select the linking line between the Choice activity named
Notification Choice and the Check-List activity named Check-List on Spill.
22. With the linking line selected, in the Engine Activities pane, right-click the Decision activity
and select Insert in between selected link.

C
ot
N
o
D

Workflow Management 2019


2-168 Module 2 – Exploring Workflow Management Features

The activity is added on the linking line. You will configure the Decision activity for a major and
minor spill, but you will do that later.

y
op
23. Reposition all the activities and link them as shown below:

C
ot
N
o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-169

Now, you will add and configure activities.


24. Select the Start activity, and then right-click and select Activity Properties.
25. In the Activity Properties pane, in the Configuration area, under the Variables property,
click the gray button to the right of the field.
The Variables window appears.
In the Workflow Variables list, note the declared variable SpillCycle on the list.

y
op
26. Click Close.
C
ot
Next, you will initialize the SpillCycle variable, which means you will add values to the variable.
27. In the Activity Properties pane, in the Configuration area, under the Initialize Variable(s)
property, click the gray button to the right of the field.
The Update Variable window appears with a Select link under Condition.
N
o
D

28. Click the Select link.

Workflow Management 2019


2-170 Module 2 – Exploring Workflow Management Features

A blank field and a window with Variables and XmlVariables listed appears. You may have to
click in the blank field before the window appears.

y
op
29. Expand Variables to display the existing variables.

C
ot
N

30. Click Variable.SpillCycle.


o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-171

The Variable.SpillCycle variable appears under Condition.


31. In the Value field, click Enter Value and enter 6, which will represent a major spill and
initializes the variable.

y
op
C
In later labs, this value can be passed from forms.
ot
32. Click OK.
The variable is now initialized.
N
o
D

Workflow Management 2019


2-172 Module 2 – Exploring Workflow Management Features

Next, you will add and configure three Information activities.

Note: The numbers with your activities may differ from those shown in this manual. Use the
numbers shown in this manual to identify the activity being addressed even if yours has a
different number.

33. In the Activities drop-down list, select Human Activities and drag an Information activity to
the design mosaic, below the Decision activity.
The activity will be named Information3.

y
34. Drag another Information activity to the design mosaic, to the right of the spill approval
activities and between Approval Low Spill and Approval Medium Spill.
The activity will be named Information4.

op
35. Drag another Information activity to the right of the spill approval activities, between
Approval Medium Spill and Approval Hazardous Spill.
The activity will be named Information5.

C
ot
N
o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-173

36. Use the Activity Properties pane to configure the Information3, Information4, and
Information5 activities as follows and save each configuration.
Information3

Name: Notify Operator on Spill


Description: Notification to Operator
Assign Actor(s): Joe (Operator 1)

Information4

y
Name: Inform Supervisor on Approval
Description: Inform Supervisor of Approved Spill Action
Assign Actor(s): Lenny (Supervisor 1)

op
Information5

Name: Inform Supervisor on Rejection


Description: Inform Supervisor of Rejected Spill Action
Assign Actor(s): Lenny (Supervisor 1)

C
ot
N
o
D

Workflow Management 2019


2-174 Module 2 – Exploring Workflow Management Features

Now, you will configure the Decision activity you added earlier. You will set up the major and minor
spill settings for the SpillCycle variable you declared and initialized earlier.
37. With the Decision activity selected, in the Activity Properties pane, configure and save the
configuration for the activity as follows:

Name: Decision on Spill Type


Description: Type of Spill Based on Cycle

38. Under the Decisions property, click the gray button to the right of the field.
The Decision window appears.

y
op
C
39. To the right of Rule, click the Edit Condition button.
ot
The Conditions window appears with a Select link under Condition.
N
o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-175

40. Click the Select link.


A blank field and a drop-down list with Workflow Instance and Build Expression listed
appears. You may also hover over the link, and then click in the blank field that appears before
the drop-down list appears.

y
op
41. Expand Workflow Instance.

C
42. Scroll down to Variables and expand it to display the variables you have declared.
ot
N

43. Click SpillCycle.


o
D

Workflow Management 2019


2-176 Module 2 – Exploring Workflow Management Features

The SpillCycle variable is added as a condition.


44. In the Value field, enter 5, which will represent a minor spill and initialize the variable.

y
op
45. Click OK.
C
ot
The Decision window appears with the Condition field showing the variable name and
condition.
46. In the Output field, enter Minor Spill.
N
o
D

47. To add another condition, click Add Rule .

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-177

48. Repeat Steps 39 to 46 to configure a condition for a major spill as follows:

Variable: SpillCycle
Value: 6
Condition: Major Spill

y
op
C
49. Below this second condition, in the Else area, in the Output field, enter OK, which will be used
if none of the other conditions are true.
ot
N
o
D

50. Click OK.

Workflow Management 2019


2-178 Module 2 – Exploring Workflow Management Features

The workflow reappears with the Decision activity name and description.

y
op
51. Add and label linking lines for the activities you added as shown below.

Note: For each Approval activity, you are adding two linking lines from the activity. One line
is the Approved linking line, which links to the Information activity named Inform

C
Supervisor on Approval. The other line is the Rejected linking line, which links to the
Information activity named Inform Supervisor on Rejection.

52. Select and right-click each Rejected line, and then select Change Color.
53. In the color palette, select the red color on the left and click OK.
ot
54. Select and right-click each Rejected line, and then select Thick Line.
The red color will make it easier to identify the Approved and Rejected linking lines.
N
o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-179

Now, you will set up notification messaging. You will configure messages to be sent to the operator and
supervisor regarding the spill and the action taken. You will also read a variable value.
55. Select the Information activity named Notify Operator on Spill, and in the Activity
Properties pane, expand Notification Contents.
You can use the Subject property to briefly describe a subject or the Body property to provide
action details.
56. Under the Subject property, click the gray button to the right of the field.

y
op
C
ot
The window you will use to configure the subject for the operator’s message appears.
57. In the body of the message, enter Minor Spill Reported with Spill Value.
N
o
D

Workflow Management 2019


2-180 Module 2 – Exploring Workflow Management Features

You will now add the variable.


58. In the field drop-down list, select Variable.
59. In the drop-down list beside Variable, select Variable.SpillCycle.
60. In the message, click at the end of the line, and then click Append.
The SpillCycle variable is added.

y
op
The Subject property can now read the value for this variable, and the subject will be visible in
the user’s Inbox.

61. Select the variable text and use the text tool below the Append button to change the font
color to red.

C
ot
N

You can also change the font size and format, and use the paint button to add a
background color.
62. Click Update.
o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-181

63. In the workflow, select the Information activity named Inform Supervisor on Approval.
64. In the Activity Properties pane, expand Notification Contents.
65. Under the Subject property, click the gray button to the right of the field.

y
op
The dialog box you will use to configure the subject for the supervisor’s message appears.
66. In the body of the message, enter Cleaning Task Approved/Completed.

C
ot
N
o

67. Click Update.


D

You have configured the Subject property. Now, you will configure the Body property.

Workflow Management 2019


2-182 Module 2 – Exploring Workflow Management Features

68. With the Information activity named Inform Supervisor on Approval still selected, in the
Activity Properties pane, expand Notification Contents.
69. Under the Body property, click the gray button to the right of the field.

y
op
The dialog box you will use to configure the supervisor’s message appears.
70. In the body of the message, enter Hi ,.
71. In the field drop-down list, ensure SendTo value is selected.

C
72. In the drop-down list beside SendTo value, select Value.SendTo value.Name.
You are selecting this variable because you do not know which supervisor should receive the
notification. The system will automatically update the variable with the correct supervisor.
ot

73. In the message, click to the left of the comma, and then click Append.
N

The Value.SendTo.UserName variable is added.


o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-183

74. In the body of the message below the first line, enter:
Action Taken on Major Spill Reported with Spill Value ; Cleaning Performed by Cleaning
Crew.

y
75. In the field drop-down list, select Variable.

op
76. In the drop-down list beside Variable, select Variable.SpillCycle.
77. In the message, click to the left of the semicolon, and then click Append.
The SpillCycle variable is added.

C
ot
78. To sign the message, add two blank lines, and then enter Regards,.
79. Add one blank line.
80. In the field drop-down list, ensure Variable is selected.
N

81. In the drop-down list beside Variable, select Variable.SubmittedBy.Name.


o
D

Workflow Management 2019


2-184 Module 2 – Exploring Workflow Management Features

82. In the message, click the blank line below Regards, and then click Append.
The Variable.SubmittedBy.UserName variable is added.

y
op
83. Click Update.
C
Next you will configure the other Information activity.
ot
84. In the workflow, select the Information activity named Inform Supervisor on Rejection.
85. In the Activity Properties pane, expand Notification Contents and under the Subject
property, click the gray button to the right of the field.
N
o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-185

86. In the body of the message in the window that appears, enter Cleaning Could not be
Performed by Cleaning Crew on Reported Major Spill value.
87. In the field drop-down list, select Variable.
88. In the drop-down list beside Variable, select Variable.SpillCycle.
89. In the message, click at the end of the line, and then click Append.
The SpillCycle variable is added.

y
op
90. Click Update.

Publish and Test Run

91. Click Publish and Test Run.

C
Now, you will trigger the workflow to test it.

The Analyst’s View appears with the Notification Choice activity awaiting action.
ot
N
o
D

92. Log out of the Enterprise Console as admin and log in as Lenny.
93. In the Work items list, click the top item.

Workflow Management 2019


2-186 Module 2 – Exploring Workflow Management Features

The WorkItem Detail View appears with the Notify Operator and Notify Safety Officer
buttons at the bottom-right of the window.

y
op
C
ot
94. Click Notify Operator.
The WorkItem Detail View closes and the task is removed from the Work items list because
N

the required action for this user has been completed. The task has been sent to the operator
Joe, who will be notified of a major spill.
o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-187

95. Use the Reports menu to view the Awaiting status of the workflow.
The Check-List activity named Check-List on Spill is awaiting an action.

y
op
C
ot
96. Log out as Lenny and log in as Joe.
N
o
D

Workflow Management 2019


2-188 Module 2 – Exploring Workflow Management Features

97. In the Work items list, click the task.


The WorkItem Detail View appears with the Check-List items on the right.
98. In the What's the reason for the spill? field, enter Technical.
99. In the Which areas got affected? area, check Conveyor Belt and Floor.
100.In the What’s the estimated size of the spill? drop-down list, select Large.

y
op
C
ot
N

101.Click Submit.
The WorkItem Detail View closes and the task is removed from the Work items list because
the required action for this user has been completed. The task has been sent to the cleaner
Rob.
o
D

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-189

102.Before you log in as Rob, switch to the admin log in and use the Reports menu to check the
Awaiting status, and note that the Approval activity named Approval Hazardous Spill is
awaiting an action.

y
op
103.Log in as Rob.
C
104.In the Work items list, click the task.
The WorkItem Detail View appears.
ot
N
o
D

105.Click Approve.

Workflow Management 2019


2-190 Module 2 – Exploring Workflow Management Features

The WorkItem Detail View closes and the task is removed from the Work items list because
the required action for this user has been completed. The task has been sent to the supervisor
Lenny.
106.Log in as Lenny.
The Work items list displays Lenny’s notifications. The top two items are the notifications
you configured with messages, one of which has the subject.

y
op
107.In the Work items list, click the notification with the subject.
The WorkItem Detail View appears with the subject and body text. Notice that Lenny was
substituted for the Value.SendTo value.Name variable you used when configuring the
notification. The value 6 was substituted for the Major Spill value. Also, admin was

C
substituted for the Variable.SubmittedBy.Name variable at the end of the message. Scroll
down to see it.
ot
N
o
D

That is the last activity in the workflow.

Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-191

108.Use the Reports menu to view the Completed status of the workflow.

y
op
C
ot
N
o
D

Workflow Management 2019


2-192 Module 2 – Exploring Workflow Management Features

y
op
C
ot
N
o
D

Wonderware Training
Section 6 – Integration and Email Activities 2-193

Section 6 – Integration and Email Activities


This section explains the following Integration activities: Script activity, Invoke WebAPI activity,
and File Operations. It also discusses how to work with the following Communication activities:
Email, Notification, and Wait for Email.

Integration Activities
The following Integration activities will be discussed: Script activity, Invoke WebAPI activity, and

y
File Operations.

Script Activity

op
The Script activity enables script written in languages such as Jscript and VBScript to be run from
the workflow. When the Script activity is included in the workflow, the activity calls the Run method
in the script. The references to the assemblies in the script are taken from the activity properties.
The string value returned from the Run method of the script is assigned to the Output parameter.
The Script activity runs the script and gives the return values specified in the properties. The link
matching this value is picked up to continue workflow execution.

Features of Script Activity


during design
C
The Script activity has the following features:
Compilation of the script code at design time to enable discovery of syntax or other errors

Loading all scripts defined through script activities as a single assembly


ot
All script activities are compiled as a single assembly and only one assembly is loaded
during workflow execution; this significantly improves performance.
 When a workflow is published, the script details are stored in the SWScriptCode table to
enable identification of source code and assembly references
N
o
D

Workflow Management 2019


2-194 Module 2 – Exploring Workflow Management Features

Activity Properties
The Script activity has to be configured by specifying appropriate values for the different properties
in the Activity Properties area. To access the Activity Properties, either click the Activity Properties
tool on the toolbar or select the appropriate option from the right-click menu for the Script activity.

y
op
C
ot
The Activity Properties are organized by groups of related properties. Each group is described
below.
Name & Description (Optional - set only if necessary)
Name: Name for the activity
N

 Description: Brief description of the activity


Programming (Mandatory - must be set to run activity)
Use these properties to program the Script activity:
 Language: Specify the language of the script to be run
o

This property can be set to C#.NET, Jscript, or VBScript, depending on the scripting
language required.
D

Wonderware Training
Section 6 – Integration and Email Activities 2-195

 Code: Specify the code of the script to be run


 To set the Code property, click the button for the Code property to open the property
window. Enter the code directly in the text editor. If you want to assign the code
dynamically during runtime, you can do so using the Field controls. For example, you
can add a variable or content pointing to the code in the two drop-down lists for Field
and click the Append button. This will add the placeholder for the variable or content in
the text editor. At runtime, this placeholder will be replaced by the corresponding
value—the code.
You can manipulate the text using the appropriate tools from the toolbar. You can cut,
copy, and paste text; undo and redo changes; zoom the view in and out; as well as

y
print the text. You can format the text, if necessary, using the formatting tools. You can
make text bold or italic, or change the font or size and set text or background color.
After adding the code, click the Update button to save the code or click the Close

op
button to close the window without saving the code.
See Script: Code for a detailed description of the Code property window.
 References: Specify the global objects that can be referenced in the script
 To set the References property, click the button for the References property to open
the property window. Enter the reference object in the References field. Next, enter
the corresponding assembly path in the Assembly Path field. After entering the return
value details, click the Add Row button to add this reference and display a new row for

C
entering another reference. Remove rows, if necessary, by selecting them and clicking
the Remove Selected button. After specifying the references, click the Update button.
See Script: References for a detailed description of the References property window.
Output Values (Mandatory - must be set to run activity)
Use these properties to specify the output values for the activity:
ot
 Return Values: Specify the return values for this action. These values become the
conditions for the workflow engine to run the next action.
 To set the Return Values property, click the button for the Return Values property to
open the property window. Enter the return value in the Return Values field. After
entering the return value details, click the Add Row button to add this return value and
display a new row for entering another return value. Remove rows, if necessary, by
N

selecting them and clicking the Remove Selected button. After specifying all the return
values, click the Update button.
See Script: Return Values for a detailed description of the Return Values property
window.
 Action outputs: The Script action does not have a standard return value. It will output
the value specified by the user in the Return Values property.
o

Exception Behavior
Each activity has the Raise error on unhandled linked output property; when clicked, it shows
all the default configured mapped error outputs in red with their check boxes selected.
D

Looping Behavior
 Loop through this action if output is: Specify the condition for looping the activity
by selecting an activity output in the drop-down list.

Workflow Management 2019


2-196 Module 2 – Exploring Workflow Management Features

Invoke Web API Activity


You can use the Invoke Web API activity to invoke a web API from the workflow. Use the output of
the activity to determine the path of workflow execution. You can use any HTTP client to invoke
your web API—you can invoke it directly from a web browser. When the Web API framework
receives a request, it routes the request to an action. To determine which action to invoke, the
framework uses a routing table.

Activity Properties
To configure the Invoke Web API activity, specify the appropriate values for the different properties

y
in the Activity Properties area. To access the Activity Properties, either click the Activity Properties
tool on the toolbar or select the appropriate option from the right-click menu for the Invoke Web
API activity.

op
C
ot
The Activity Properties are organized by groups of related properties. Each group is described
below.
N

Name & Description (Optional - set only if necessary)


 Name: Name for the activity
 Description: Brief description of the activity
Configuration
 Configure Web API: Configure the Web API to be called; Web APIs are frameworks to
o

build HTTP services for browsers and mobile devices


For more information about this activity property, see Invoke Web API: Configure Web
API.
D

Exception Behavior (Optional - set only if necessary)


Each activity has the Raise error on unhandled linked output property. Configure this property
to raise an error if the output is not linked to the next activity in the workflow. You can also use this
property to define and configure email templates and users for the exception mail.
See Mapped Error Outputs for more details.

Wonderware Training
Section 6 – Integration and Email Activities 2-197

Looping Behavior (Optional - set only if necessary)


 Loop through this action if output is: Specify the condition for looping the activity
by selecting an activity output in the drop-down list:
 No Loop
 Error Countered
 Successful
 Unsuccessful

File Operations Activity

y
You can use the File Operations activity to perform file transfers from within the workflow. You can
use it to transfer files within local networks, as well as using HTTP and FTP protocols.

op
File Transfers Supported
The following file transfers are supported:
 UNC — HTTP - Example: \\computername\sharename\filename — Http://computername/
WebFolder /filename
 File — HTTP - Example: \\DriveName\foldername\filename — Http://computername/
WebFolder /filename


Sharename/filename
C
File — FTP - Example: \\Drivename\ftpFolder\FileName — Ftp://computername/

FTP — Filen - Example: Ftp://computername/Sharename/filename —


Drivename\FolderName\
HTTP — UNC - Example: Http://computername/WebFolder /filename —
ot
\\computername\sharename\filename
 UNC — UNC - Example: \\computername\sharename\filename —
\\computername\sharename\filename
 File — File - Example: \\DriveName\foldername\filename —
DriveName\foldername\filename
 UNC — HTTP (Directory Transfer) Example: \\Computername\sharename\filename —
N

Http://ComputerName/WebFolder
 File — HTTP (Directory Transfer) Example: \\Drivename\FolderName —
Http://computername/WebFolder
 File — FTP (Directory Transfer) Example: Drivename\FolderName —
Ftp://computername/ftpFolder
o

Note: The above examples are in the following format: Source Details — Destination Details
D

Workflow Management 2019


2-198 Module 2 – Exploring Workflow Management Features

The File Operation activity is not supported if the Source and Destination paths are in the
combinations given below:
 FTP and HTTP
 FTP and FTP
 HTTP and FTP
 HTTP and HTTP

Variable for Getting the List of Files that Were Transferred


The list of files that were transferred using the File Operations activity can be retrieved using a

y
variable of type array, with the following syntax:
^'+CurrentActivity.Name+ 'FilesUploaded'

op
For example, ^TransferFileOperationFilesUploaded

Variable for Getting the List of Files that Were Not Transferred
The list of files that were not transferred using the File Operations activity can be retrieved using a
variable of type array, with the following syntax:
'^'+CurrentActivity.Name+ 'FilesNotUploaded'

C
For example, ^TransferFileOperationFilesNotUploaded
ot
N
o
D

Wonderware Training
Section 6 – Integration and Email Activities 2-199

Activity Properties
To configure the File Operations activity, specify the appropriate values for the different properties
in the Activity Properties area. To access the Activity Properties, either click the Activity Properties
tool on the toolbar or select the appropriate option from the right-click menu for the File Operations
activity.

y
op
C
The Activity Properties are organized by groups of related properties. Each group is described
below.
ot
Name & Description (Optional - set only if necessary)
 Name: Name for the activity
 Description: Brief description of the activity
Configuration (Mandatory - must be set to run activity)
Source Details: Specify the details of the file source, such as its location, the transfer
N


protocol, and so on
 To specify the details of the file source, click the button for the Source Details property
to open the property window. Select an option in the Protocol drop-down list to specify
the file operation (transfer) protocol. Next, in the Location field, assign the URI/UNC of
the source file or directory as the value. To build an expression to assign the location
details, select the operator, type of value (Value, Variable, Content, or XMLVariables),
o

and the value for the property in the corresponding drop-down lists.
In the same way, you can assign a search pattern to filter the type of file to be copied
or transferred as the value for the Pattern field. For example, you can specify *.doc as
D

the filter pattern. This will select only files with the extension .doc for copying or
transferring.
You can also assign the user name and password of the source file/directory in the
User Name and Password fields, respectively, by following the same procedure used
for the Location field to assign the URI/UNC. In addition, you can assign the domain
name and port number of the source in the DomainName and PortNumber fields,
respectively, by following the same procedure used for the Location field to assign the
URI/UNC. After adding the parameter, click Submit to save it.

Workflow Management 2019


2-200 Module 2 – Exploring Workflow Management Features

See File Operations: Source Details for a detailed description of the Source Details
property window.
 DestinationDetails: Specify the details of the file destination
 To specify the details of the file destination, click the button for the DestinationDetails
property to open the property window. Select an option in the Protocol drop-down list
to specify the file operation (transfer) protocol. Next, in the Location field, assign the
URI/UNC of the source file or directory as the value. To build an expression to assign
the location details, select the operator, type of value (Value, Variable, Content, or
XMLVariables), and the value for the property in the corresponding drop-down lists.
In the same way, you can assign a search pattern to filter the type of file to be copied

y
or transferred as the value for the Pattern field. For example, you can specify *.doc as
the filter pattern. This will select only files with the extension .doc for copying or
transferring.

op
You can also assign the user name and password of the source file/directory in the
User Name and Password fields, respectively, by following the same procedure used
for the Location field to assign the URI/UNC. In addition, you can assign the domain
name and port number of the source in the DomainName and PortNumber fields,
respectively, by following the same procedure used for the Location field to assign the
URI/UNC. After adding the parameter, click Submit to save it.
See File Operations: Destination Details for a detailed description of the

C
Destination Details property window.
Exception Behavior
Each activity has the Raise error on unhandled linked output property; when clicked, it shows
all the default configured mapped error outputs in red with their check boxes selected.
Looping Behavior (Optional - set only if necessary)
ot
 Loop through this action if output is: Specify the condition for looping the activity
by selecting an activity output in the drop-down list.
 Action outputs: The File Operations activity returns the following values:
 Successful: Displayed when the file transfer is successful
 Failure: Displayed when the file transfer is unsuccessful
N
o
D

Wonderware Training
Section 6 – Integration and Email Activities 2-201

Communication Activities
The following Integration activities will be discussed: Email, Notification, and Wait for Email.

Email Activity
You can use the Email activity to send an email to a selected set of actors. The actors can be
selected by building a query. The workflow engine evaluates this query and sends an email to all
the actors resulting from the query. If no actor is selected, the email will be sent to all the actors.
The subject and body of the email can be customized by appending the resource properties

y
available.

Adding Email Attachments Using Variables and Contents

op
You can add an email attachment using either variables or contents.
Variables
To add email attachments using variables, prefix the variable name with ^[ActivityName]. For
example, for the activity named EmailNotification, name the variable as
^EmailNotificationattachments. Set the value for the variable with physical paths to the file. Use a
semicolon as a separator to add multiple files.
Contents

C
To send file attachments with the email, add content with a name prefixed by the activity name
followed by attachments. For example, if a file attachment has to be sent along with an email from
an activity named EmailNotification, add content with EmailNotificationattachments as its name.
The XPath expression should select the nodes that contain the path for the files to be attached.
For example, //fileattachments.
ot
N
o
D

Workflow Management 2019


2-202 Module 2 – Exploring Workflow Management Features

Activity Properties
The Email activity has to be configured by specifying appropriate values for the different properties
in the Activity Properties area. To access the Activity Properties, either click the Activity Properties
tool on the toolbar or select the appropriate option from the right-click menu for the Email activity.

y
op
C
ot
N

The Activity Properties are organized by groups of related properties. Each group is described
below.
Name & Description (Optional - set only if necessary)
o

 Name: Name for the activity


 Description: Brief description of the activity
D

Configuration (Mandatory - must be set to run activity)


 From: The sender’s email is automatically added.
 ToResource: Specify the resources to whom the email will be sent
 To specify the actors to receive the email, click the button for the To property to open
the property window. Use the actors’ properties to build an expression to select the
actors: Select an attribute from the first drop-down list, and then the operator, type of
value (Value, Variable, Content, or XMLVariables), and the corresponding value for the
property from the corresponding drop-down lists. Select End in the last drop-down list
to complete the expression. If you are building a compound expression, you can

Wonderware Training
Section 6 – Integration and Email Activities 2-203

select one of the logical operators to connect the different conditions that form the
expression. Click Add to add the condition to the expression. This will display the
expression in the text area.
To remove a condition already added to the expression, click Undo. You can also click
Clear to clear an existing expression, if necessary. This is useful if you want to clear
large expressions in the text area to build a new expression. After building the
expression, click Update to save it.
See Email: ToResource for a detailed description of the To property window.
See the Using XML Variables section in About XML Variables for details on how to
use the XMLVariables to build the expression.

y
 To Email Address: Send an email to a user who is not a part of the resource provider;
use this option to notify customers, for example
To use the To Email Address property, you can:

op

 Send an email to any email address using the Expression Builder or by directly
entering the email address in the field
 Use the variables, XML variables, and content or any expression to set the email
address
 To configure To Email Address (optional - set only if necessary), complete the
following steps:

provider.
C
Right-click the Email activity to go to the Activity Properties. Set the To Email
Address property to send email to the resource who is not a part of the resource

Note: If both ToResource and To Email Address values are set, the ToResource
property will be used.
BCC: Enter the email address for the email recipient to receive the Blind Carbon Copy
ot
BCCResource: This property specifies the resources to whom a copy of the email is
to be sent as a Blind Carbon Copy. To select the resources, click the BCCResource
button in the Properties pane of the Process Designer. Build the condition for selecting
the resources and click Update button.
For detailed steps to configure the Email activity, see Email Activity and scroll down on the page.
N

Notification Activity
The Notification activity is incorporated in the workflow process design to send notifications to
actors by email, IM messages, and SMS. The messages can be customized for each actor by
appending the resource properties to the message. The IM messages can be sent to any type of
Instant Messenger service that the configured Jabber server supports. A new Jabber account can
o

also be created with this action, if no account is available. Services or agents can be registered to
be able to send messages to actors who use services other than Jabber.
D

Workflow Management 2019


2-204 Module 2 – Exploring Workflow Management Features

Activity Properties
The Notification activity has to be configured by specifying appropriate values for the different
properties in the Activity Properties area. To access the Activity Properties, either click the Activity
Properties tool on the toolbar or select the appropriate option from the right-click menu for the
Notification activity.

y
op
below. C
The Activity Properties are organized by groups of related properties. Each group is described

Name & Description (Optional - set only if necessary)


ot
 Name: Name for the activity
 Description: Brief description of the activity
Configuration (Mandatory - must be set to run activity)
 Notification Type: In the drop-down list, select email, instant message to an IM client, or
SMS to cell phones; the All option sends messages through all media
N

 IM: Send instant messages; needs a Jabber account to send messages


 To set the IM property, click the button for the IM property. Enter the Registered
Jabber user name and password. Click Submit, after which you are redirected to
another page where Jabber transports are registered. A transport is a small computer
program that runs on a Jabber server and translates messages from other networks
into the Jabber format, so that they become readable by any Jabber client.
o

See Notification: IM for a detailed description of the IM property window.


D

Wonderware Training
Section 6 – Integration and Email Activities 2-205

Actors (Mandatory - must be set to run activity)


 ToResource: Specify the resources to whom the email will be sent
 To specify the actors to receive the notification, click the button for the To property to
open the property window. Use the actors’ properties to build an expression to select
the actors: Select an attribute in the first drop-down list, and then the operator, type of
value (Value, Variable, Content, or XMLVariables), and the corresponding value for the
property in the corresponding drop-down lists. Select End in the last drop-down list to
complete the expression. If you are building a compound expression, you can select
one of the logical operators to connect the different conditions that form the
expression. Click Add to add the condition to the expression. This will display the

y
expression in the text area.
To remove a condition already added to the expression, click Undo. You can also click
Clear to clear an existing expression, if necessary. This is useful if you want to clear

op
large expressions in the text area to build a new expression. After building the
expression, click Update to save it.
See Notification: ToResource for a detailed description of the To property window.
See the Using XML Variables section in About XML Variables for details on how to
use the XMLVariables to build the expression.
Notification Contents (Optional - set only if necessary)

 C
From Email Address: Send an email notification from this address
If the Notification Type is All or Email, you must set this property or the email notifications
will not be sent; setting this property is optional for any other Notification Type.
Message: This is the content of the notification sent to the resources, which can be
customized for each resource
To enter the Notification message, click the button for the Message property to open
ot

the property window. Enter the message in the text editor. If you want to personalize
the message, use the Field controls to add resource property values. For example, to
add a message that includes the name of the actor submitting the approval request,
enter Hello, and then select Variable and Variable.SubmittedBy.name in the two drop-
down lists for Field, and click Append. This will add the placeholder for the variable
after the text entered in the text editor. At runtime, this placeholder will be replaced by
N

the corresponding value (the name), resulting in a personalized salutation. Enter a


message in the next line to complete the message body.
You can manipulate the text using the appropriate tools from the toolbar. You can cut,
copy, and paste text; undo and redo changes; repeat the last command; zoom the
view in and out; as well as print the text. You can format the text, if necessary, using
the formatting tools. You can make text bold or italic, or change the font or size and set
o

text or background color.


After adding the message, click the Update button to save the message or click the
Close button to close the window without saving the message.
See Notification: ToResource for a detailed description of the Message property
D

window.
 Activity outputs: None
The Notification activity does not return any value.

Workflow Management 2019


2-206 Module 2 – Exploring Workflow Management Features

Wait for Email Activity


You can use the Wait for Email activity to wait for email messages for a specific time period; it can
be set in the activity's properties. It can also be used to filter incoming email with specific
conditions set in the properties. It can store email (completely or partially) in specified variables.
Options to save attachments, including the location to save, can also be specified. Depending on
different property settings, the activity will give different outputs.
See Localizing the Response Sent for an Invalid Email to the Communication Engine for
more information on localizing an email.

y
Variables for Capturing EmailIds
To get the Email Id of the last received mail, use the Workflow Management System variable. The
variable name has to be prefixed with "@"+CurrActivity.Name + "^MailID".

op
For example, If activity name is Waitforemail1, then variable name should be @
Waitforemail1^MailID.

Note: The use of the Workflow Management System variable CurrActivity.Name + "^EMailID" has
been retained to ensure backward compatibility. For example, If activity name is Waitforemail1,
then variable name should be Waitforemail1^EMailID.

Activity Properties

C
The Wait for Email activity has to be configured by specifying appropriate values for the different
properties in the Activity Properties area. To access the Activity Properties, either click the Activity
Properties tool on the toolbar or select the appropriate option from the right-click menu for the Wait
for Email activity.
ot
N
o
D

Wonderware Training
Section 6 – Integration and Email Activities 2-207

The Activity Properties are organized by groups of related properties. Each group is described
below.
Name & Description (Optional - set only if necessary)
 Name: Name for the activity
 Description: Brief description of the activity
Configuration
 Filter Expression (Mandatory - must be set to run activity): Filter the incoming email
It will add an email filter. On execution, the SMTP Notification Engine will be notified about

y
the newly added filter, so that it will search for this pattern in the next email.
 To set the condition to filter the incoming email messages, click the button for the Filter
Expression property to open the property window. Build an expression to set the filter:

op
Select an attribute from the first drop-down list, and then select the operator, type of
value (Value, Variable, Content, or XMLVariables), and the corresponding value for the
property in the corresponding drop-down lists. Select End in the last drop-down list to
complete the expression. If you are building a compound expression, you can select
one of the logical operators to connect the different conditions that form the
expression.Click Add to add the condition to the expression. This will display the
expression in the text area. To remove a condition already added to the expression,
click Undo. To clear an existing expression, if necessary, click Clear. This is useful if


Expression property window. C
you want to clear large expressions in the text area to build a new expression. After
building the expression, click Update to save it.
See Wait for Email: Filter Expression for a detailed description of the Filter

Valid for Emails (Optional - set only if necessary): Specify the number of email messages
for which the action should wait
ot
 Set Variables And Contents from Email (Optional - set only if necessary): Assign the
email partly/fully to a variable or content
 To set the filtered email to variables and contents, click the button for the Set Variables
And Contents from Email to open the property window. First, select the variable in the
Variable drop-down list. Next, specify the search criteria in the Search criteria field.
You can either enter the regular expression directly or click the Generate RegExp for
N

Selected Row button to generate a regular expression. If you click the Generate
RegExp for Selected Row button it displays a set of fields and buttons at the bottom of
the property window. Specify the start string for the regular expression in the Start
String field and Start and End delimiters in the corresponding text boxes of the
Delimiters fields. After specifying these values, click Generate to generate the regular
expression. Click Hide to hide these fields. Specify where to search by selecting an
o

appropriate option in the Search drop-down list. You can set the action to search in the
entire email, the subject, and the attachments, or using other options. In the Set
variable in the named group field, specify the name of a group to which the variable
should belong. Click the New row tab to add the current search expression and
D

display a blank row to add another expression. If you need to remove any search
expressions, you can select them and click Remove selected. After specifying all the
search parameters, click Update to save the new settings.
See Wait for Email: Set Variables And Contents from Email for a detailed
description of the Set Variables And Contents from Email property window.

Workflow Management 2019


2-208 Module 2 – Exploring Workflow Management Features

 Attachment Save Options (Mandatory - must be set to run activity): Set the attachment
saving options
The mail attachments can be saved according to specified options. Filter attachments to
save by searching for a string in the file name or file content.
 To specify the attachment save options, click the button for the Attachment Save
Options property to open the property window. Select the save option in the first drop-
down list. If you select All Files, it will save all the attachment files. If you select File
Names or File Contents, it will save either the specified files or the specified contents
of the attachment file. This will display the corresponding fields/drop-down lists to
specify the parameters. Select the type of value (Value, Variable, or Content) in the

y
second drop-down list, and specify the corresponding value for the property in the
next text box (if Value is selected) or drop-down list. Click Update to save the new
option.

op
Note: In user specified location, you have to append the mail id. If the user-specified
location is C:\SkeltaMailAttachments\, then the actual location will be
C:\SkeltaMailAttachments\<mailId>.
Example
Location: c:\Temp\
Actual: c:\Temp\123 –(123 is last mailid)
Location: c:\Temp

C
Actual: c:\Temp123 –(123 is last mailid)
See Wait for Email: Attachment Save Options for a detailed description of the
Attachment Save Options property window.
ot
 Attachment Save Location (Optional - set only if necessary): This property is used to
specify the location in which to save the attachments.
 To specify the location to save the attachment, click the button for the Attachment
Save Location property to open the property window. Select the protocol to be used to
save the file in the location. Specify the path of the location in the Location property:
Build an expression to assign the location details: Select the operator, type of value
(Value, Variable, Content, or XMLVariables), and the value for the property in the
N

corresponding drop-down lists. Assign a search pattern to filter for the type of file to be
copied or transferred as the value for the Pattern field. For example, you can specify
*.doc as the filter pattern. This will select only files with the extension .doc for copying
or transferring. You can also assign the user name and password of the source file/
directory in the User Name and Password fields, respectively, by following the same
procedure you used to build an expression to assign the location details. In addition,
o

you can assign the domain name and port number of the source in the DomainName
and PortNumber fields, respectively, by following the same procedure you used to
build an expression to assign the location details. After adding the parameter, click
Submit to save it.
D

See Wait for Email: Attachment Save Location for a detailed description of the
Attachment Save Location property window.

Wonderware Training
Section 6 – Integration and Email Activities 2-209

Escalation & Timeout (Optional - set only if necessary)


You use the Escalation & Timeout properties to specify escalation and timeout settings for the
activity.
 Timeout Warning: Set the Timeout warning
 Timeout for Action: Set timeouts for this action; if specified, the action will time out after
the specified time span
Exception Behavior
Each activity has the Raise error on unhandled linked output property; when clicked, it shows

y
all the default configured mapped error outputs in red with their check boxes selected.
See Mapped Error Output for more details.
Looping Behavior (Optional - set only if necessary)

op
 Loop through this action if output is: Specify the condition for looping the activity
by selecting an activity output from the drop-down list
 Activity outputs: The Wait for Email activity returns the following values:
 Timeout Warning: A warning for timeout is to be generated
 Email Received(Waiting): An email matching the specified filter condition is
received

C
Timeout: The activity has timed out
ot
N
o
D

Workflow Management 2019


2-210 Module 2 – Exploring Workflow Management Features

y
op
C
ot
N
o
D

Wonderware Training
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-211

Lab 7 – Using Script Activity for Conditional


Allocation of Approver

Introduction
In this lab, you will perform conditional allocations of tasks to users. You will import the Lab 6
workflow, and then remove some activities and add a Script activity. You will configure the Script
activity, initialize a variable in the Script activity, and read the variable value in the Script activity.

y
You will also assign a task to a user based on conditional checking and use HTML tags in text
notification.

op
Objectives
Upon completion of this lab, you will be able to:
 Configure Script activity
 Initialize a variable in Script activity
 Read the variable value in Script activity

 Use HTML tags in text notification

C
Assign a task to a user based on conditional checking
ot
N
o
D

Workflow Management 2019


2-212 Module 2 – Exploring Workflow Management Features

Export and Import a Workflow


First, you will export the Lab6 workflow, so that you can use it as a base for the workflow you will
create. Then, you will create a new workflow and import the exported Lab6 workflow. In the last
lab, you were logged in as Lenny, a supervisor, so you can continue with that log in.
1. Unpublish the Lab6 workflow, open it in the Process Designer, and export it to the
C:\Training folder.
2. On the Workflows page, create a new standard workflow with the following title and
description:

y
:
Title: Lab7
Description: Using Script Activity for Conditional Allocation of Approver

op
The Process Designer appears.

C
Note that at the top-right of the window, TrainingRepository / Lab7 / 1 is visible.
3. Import the Lab6_1.xml file from C:\Training.
ot
N
o
D

Wonderware Training
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-213

Configure the Workflow


Now, you will configure the workflow you imported. You will remove the activities you do not need,
change an activity, add Information and Script activities, and configure the linking lines and
activities.
4. Delete the Approval activities named Approval Low Spill and Approval Hazardous Spill.
5. Delete the Information activities named Inform Supervisor on Approval and Inform
Supervisor on Rejection.

y
op
C
ot
6. Move the Information activity named Notify Supervisor on Spill to the right of the Approval
activity named Approval Medium Spill.
The linking line will move with the activity, but will not remain straight.
N

7. Select the linking line between the Check-List activity named Check-List on Spill and the
o

Notify Supervisor on Spill activity.


8. Drag the connector on the Check-List on Spill activity to the middle of the right side of the
Approval Medium Spill activity.
D

The linking line is now between the Approval Medium Spill and Notify Supervisor on Spill
activities. You may need to adjust the line so it is straight.

Workflow Management 2019


2-214 Module 2 – Exploring Workflow Management Features

9. Add one Information activity to the right of the Information activity named Notify Safety
Officer on Spill.
10. Add another Information activity to the right of the Information activity named Notify
Operator on Spill.

Note: The numbers with your activities may differ from those shown in this manual. Use the
numbers shown in this manual to identify the activity being addressed even if yours has a
different number.

y
op
C
ot
11. In the Activities drop-down list in the left pane, select Integration Activities.
The Integration Activities appear in the left pane.
12. In the workflow, select the High Risk linking line between the Check-List on Spill and
Approval Medium Spill activities.
13. With the linking line selected, in the Integration Activities pane, right-click the Script activity
N

and select Insert in between selected link.


o
D

Wonderware Training
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-215

The Script activity is added on the linking line.

y
14. Add two linking lines between the Check-List on Spill and Script1 activities.
The High Risk linking line will move to the top of the lines when you add the third line.
15. Right-click the middle linking line and select Emergency.

op
16. Right-click the bottom linking line and select Low Risk.

C
ot
N
o
D

Workflow Management 2019


2-216 Module 2 – Exploring Workflow Management Features

17. Use the Activity Properties pane to configure the two Information activities you added as
follows:
Information4

Name: Notify Operator on Rejection


Description: Notify Operator on Cleaning Rejection
Assign Actor(s): Joe (Operator 1)

Information5

y
Name: Notify Operator
Description: Notify Operator about Cleaning Crew Allocation Failure
Assign Actor(s): Joe (Operator 1)

op
C
ot
N
o
D

Wonderware Training
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-217

18. Use the Activity Properties pane to configure the Script1 activity as follows:

Name: Script Select Cleaning Crew


Description: Conditional Selection of Cleaning Crew

19. In the Programming area, in the Language property drop-down list, select CSharp.NET.
20. In the Output Values section, under the Return Values property, click the gray button to the
right of the field.
The Return Values window appears.

y
21. In the blank Return Value field, enter Valid.

22. Click Add Row and enter Invalid.

op
C
ot
23. Click Update.
24. Click Save.
N

25. Select the Approval activity named Approval Medium Spill.


26. In the Activities drop-down list, select Human Activities.
27. Right-click the Approval activity and select Replace selected Activity.
o
D

Workflow Management 2019


2-218 Module 2 – Exploring Workflow Management Features

The Approval Medium Spill activity is replaced. The linking line will lose its label.

28. Right-click the linking line between Approval2 and Notify Supervisor on Spill and select
Approved.

y
29. Select the Approval2 activity and use the Activity Properties pane to change the name and
description as follows:

Name: Approve Cleaning Spill

op
Description: Cleaning Crew Action for Spill Cleaning

30. Click Save.


You will configure this activity more later.

C
31. Add a linking line between the Approval activity named Approve Cleaning Spill and the
ot
Information activity named Notify Operator on Rejection, and then right-click and select
Rejected.
32. Select the linking line between Script Select Cleaning Crew and the Approval activity
named Approve Cleaning Spill, and then right-click and select Valid.
33. Move Notify Operator over to the right.
N

34. Add a linking line between Script Select Cleaning Crew and Notify Operator, and then right-
click and select Invalid.
o
D

Wonderware Training
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-219

Next, you will declare a variable.


35. Select the Start activity, and then in the Activity Properties pane, under the Variables
property, click the gray button to the right of the field.
36. In the blank Workflow Variables field, enter Approver.
37. In the Type drop-down list, select string.

y
op
38. Click Update.
39. Click Save.

C
You have declared the Approver variable.
Now, you will configure the updated Approve Cleaning Spill activity.
40. Select Approve Cleaning Spill, and then in the Activity Properties pane, under the Assign
ot
Actor(s) property, click the gray button to the right of the field.
41. On the left of the Assign Actor(s) window, click the ‘(’ drop-down list and select SK User
Name.
42. In the third drop-down list, select Variable and then in the last drop-down list, confirm
Variable.Approver is selected.
N

43. Click Add.


[SK User Name] = [Variable.Approver] appears in the middle of the window on the left. This
user name will come from the Script activity.
o
D

Workflow Management 2019


2-220 Module 2 – Exploring Workflow Management Features

44. Click Update.


The Assign Actor(s) field in the Activity Properties pane updates.
HTML tags can be used in text notification to emphasize specific areas in a message.
45. With the Approve Cleaning Spill activity still selected, in the Activity Properties pane, scroll
down and expand Notification Contents.
46. Under the Subject property, click the gray button to the right of the field.

y
op
47. In the Subject window, in the body of the message, enter Spill Alert, which will be the subject
of the notification.

C
ot
N

48. Click Update.


49. With the Approve Cleaning Spill activity still selected, in the Activity Properties pane, in
Notification Contents, under the Body property, click the gray button to the right of the field.
o
D

Wonderware Training
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-221

50. In the Body window that appears, in the body of the message, enter Hi ,.
51. In the field drop-down list, ensure SendTo value is selected.
52. In the drop-down list beside SendTo value, select Value.SendTo value.Name.
You are selecting this variable because you do not know which user should receive the
notification. The system will automatically update the variable with the correct user.
53. In the message, click to the left of the comma, and then click Append.
The Value.SendTo.UserName variable is added.

y
54. In the body of the message below the first line, enter:
There is a Chemical spill reported on the Plant floor.
Your <b><i><u> Attention </u></i></b> is required.

op
C
The <b><i><u> HTML code will bold, italicize, and underline the word Attention.
55. To sign the message, add two blank lines, and then enter Regards,.
56. Add one blank line.
ot
57. In the field drop-down list, select Variable.
58. In the drop-down list beside Variable, scroll down and select Variable.SubmittedBy.Name.
59. In the message, click the blank line below Regards, and then click Append.
The Variable.SubmittedBy.UserName variable is added.
N
o
D

60. Click Update.

Workflow Management 2019


2-222 Module 2 – Exploring Workflow Management Features

61. Click Save.


Next, you will enter code for scripting.
62. In the workflow, click Script Select Cleaning Crew.
63. In the Activity Properties pane, in the Programming area, under the Code property, click the
gray button to the right of the field.
The Code window appears.

y
op
You will use the CSharp code.
C
ot
64. Select the sample VBScript code.
N
o
D

65. Delete the selection.

Wonderware Training
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-223

66. Scroll down in the window and select the sample JScript code.

y
op
67. Delete the selection.
The CSharp code remains.
C
ot
N
o
D

Workflow Management 2019


2-224 Module 2 – Exploring Workflow Management Features

Now, you will modify the logic in the CSharp code. The last few lines in the script is the logic.
68. Select the logic in the code as shown below:

y
op
69. Delete the selection.

C
ot
N
o
D

Wonderware Training
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-225

70. Navigate to C:\Training\Scripts and copy the following text from the LAB-7 Example Script
file:

string SpillLevel= ctx.Variables["EstimatedSize"].Value.ToString();


if(SpillLevel.Length > 0)
{
if(SpillLevel == "Low Risk")
{
ctx.Variables["Approver"].Value="Cesar";
}
else if(SpillLevel == "High Risk")

y
{
ctx.Variables["Approver"].Value="Charlee";
}
else if(SpillLevel == "Emergency")

op
{
ctx.Variables["Approver"].Value="Rob";
}
return "Valid";
}
else
{
return "Invalid";
}

C
ot
N
o
D

Workflow Management 2019


2-226 Module 2 – Exploring Workflow Management Features

71. Paste the copied text to the area from which you deleted the original logic.

y
op
the spill level. C
72. Review the text, and note the approvers to whom the notifications will be sent, depending on

The logic will declare a variable named SpillLevel. The logic reads the EstimatedSize value
ot
and initializes the SpillLevel variable with this value. Based on the condition check, the logic
will assign the name of the approver to the Approver variable.
73. Click Update.
The Code field in the Activity Properties pane updates.
74. Close the LAB-7 Example Script file.
N
o
D

Wonderware Training
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-227

Publish and Test Run


Now, you will test the code.
75. Click Publish and Test Run.
The Analyst’s View appears with the Notification Choice activity awaiting action.

y
op
76. You are still logged in as Lenny, so switch to the Inbox.
Press F5 on your keyboard to refresh the Inbox, if necessary.

C
ot
77. In the Work items list, click the top item.
The WorkItem Detail View appears with the Notify Operator and Notify Safety Officer
buttons at the bottom-right of the window.
N
o
D

Workflow Management 2019


2-228 Module 2 – Exploring Workflow Management Features

78. Click Notify Operator.


The WorkItem Detail View closes and the task is removed from the Work items list because
the required action for this user has been completed. The task has been sent to the operator
Joe.
79. Before you log in as Joe, use the Reports menu to check the Awaiting status and see that
the Check-List on Spill activity is awaiting an action.
80. Click the Check-List on Spill activity to confirm that Joe needs to take action.

y
op
C
ot
N

81. Log in as Joe.


82. In the Work items list, click the task.
o
D

Wonderware Training
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-229

The WorkItem Detail View appears with the Check-List items on the right.
83. In the What's the reason for the spill? field, enter High Speed.
84. In the Which areas got affected? area, check Conveyor Belt and Control Panel.
85. In the What’s the estimated size of the spill? drop-down list, select Large.

y
op
C
ot
86. Click Submit.
The WorkItem Detail View closes and the task is removed from the Work items list because
the required action for this user has been completed. The task has been sent to the cleaner
Rob.
N
o
D

Workflow Management 2019


2-230 Module 2 – Exploring Workflow Management Features

87. Before you log in as Rob, use the Reports menu to check the Awaiting status and see that
the Approve Cleaning Spill activity is awaiting an action.

y
op
88. Switch to the Inbox for Rob.
89. In the Work items list, click the task.
C
The WorkItem Detail View appears with the message you configured using HTML at the top-
left of the window and the Approve and Reject buttons at the bottom-right of the window.
ot
N
o
D

90. Click Approve.


The task is removed from the Work items list.
That is the last activity in the workflow.
91. If you desire, use the Reports menu to check the completed workflow.

Wonderware Training
y
op
C
Module 3 – Working with Workflow
Management Controls
ot
Section 1 – Controls Overview 3-3
Section 2 – Workflow Management Calendar Control 3-9
Lab 8 – Using Calendar for Timeout and Escalations 3-13
N

Section 3 – Workflow Management Queue 3-35


Lab 9 – Creating Queues 3-39
Section 4 – File Watcher Configuration 3-63
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow 3-65
o
D
3-2 Module 3 – Working with Workflow Management Controls

Module Objectives
 Provide an overview of Workflow Management controls
 Discuss the Process Designer user interface in detail
 Use the Workflow Management Inbox or Work Item list
 Configure the Calendar control
 Discuss the Queue control
 Describe the File Watcher configuration

y
op
C
ot
N
o
D

Wonderware Training
Section 1 – Controls Overview 3-3

Section 1 – Controls Overview


This section provides a high-level description of all controls and gives more detail on the Process 
Designer user interface.

Server Controls
Workflow Management provides the following server controls:

y
 Process Designer Control: Provides an interface to design and deploy workflow
processes
 Work Items List Control: Allows the workflow users to view and respond to the work
items assigned to them in a user interface that is similar to Outlook; work items are

op
delivered to the user’s Inbox with a detailed view available
 Calendar Control: Allows you to define and configure multilevel organizational calendars;
you create hierarchical organization and resource calendars used to determine availability
of resources, calculate time slots, and perform other scheduling functions
 BAM Control: Provides features that can be used by a process administrator to monitor
and control various instances of the workflows in a repository. It provides a graphical
representation of the various instances of the workflows using three different views


group
C
Queue Control: Used to group resources as a common pool and assign tasks to the

List Control: Lists the Workflows, Navigation Details, Users, Event Providers, and Event
Associations
Workflow Process execution view Control: Shows the Process execution view of the
ot
currently executing workflow
See Workflow Management Server Controls in Module 2 for more details.

Process Designer
N

The Process Designer provides the interface to model workflow processes. Workflows can be
modeled, designed, and deployed from this window. The Process Designer control is opened from
a web form in the web application.

Menu Bar
The following image shows the menu bar of the Process Designer window. This section will
o

address the Publish and Tools controls, as well as the Settings control’s WorkItem fields, Alternate
Actors, BAM Configuration, and WorkItem list layout. See in Module 2 for information on the other
controls.
D

Workflow Management 2019


3-4 Module 3 – Working with Workflow Management Controls

Publish
A workflow is deployed and activated only if it is published.

 Publish: Publish the workflow design


 Validate Definition: Validate the workflow definition

y
Tools
The Tools menu has the following options to export and import workflow definitions.

op

Settings
Designer

C
Import: Import process definition XML files, which were exported earlier, into the Process

Export: Export a workflow definition to an XML file; the exported definition can be
manually edited or moved to another database
ot
The Settings menu has the following options to configure different process level settings for other
Workflow Management Controls.
N

 Workitem Fields: Add and configure the work item fields


 Alternate Actors: Specify alternate actors to the actual assigned actors
o

 BAM Configuration: Set up critical performance measurement criteria for a workflow


 WorkItemList Layout: Display all the work item fields that have been added
D

Wonderware Training
Section 1 – Controls Overview 3-5

Work Items List


The Work items list, also known as Workflow Management Inbox, provides enhanced usability
features. Workflow users can view and respond to work items assigned in a user interface that is
similar to Microsoft Office Outlook. Work items are delivered to the user’s Inbox with a detailed
view available when the item is selected. The name of the logged-in user is displayed at the top-
right corner of the window.

Work Items List User Interface

y
The detailed view of the Work items list has the following user interface elements:
 Worklist folders
 Work items list

op
 Work item details
 Toolbar
The Work items list also provides properties that enable customization and configuration of
elements of the user interface. For details on customizing the view, see Customizing Work Items
List Views.
The Work items list allows participants in queues to manage items in their queues. A separate

C
Manager View forms a part of the Work items list. It allows users who are also managers to
administer activities assigned to their team members.
Below is a detailed view of the Work items list.
ot
Work Items List Folders
N

The worklist folders list all folders that contain work items. The Work items list folder is the top-
level folder. In the default view, the Work items list folder contains subfolders for each workflow
from which tasks have been assigned.
The workflow folder has an Inbox folder and a folder for each queue in the workflow of which the
user is a participant.
The default layout of items in the Inbox can be customized and saved as a personalized folder. All
o

items in the Inbox will also be available in the personalized folder with the specified layout.
D

Workflow Management 2019


3-6 Module 3 – Working with Workflow Management Controls

Work Items List View


The Inbox lists all open work items assigned to the user that are awaiting action or a response.
The columns displayed in the default view are:
 Workflow
 Subject
 Activity Display Name
 Priority
 Response By

y
 Assigned On
 Approver1
The Subject column lists work items in bold type. When the user takes ownership of the item, its

op
display changes from bold to normal. Double-clicking an item displays its details in Work Item
Details.

Work Item Details


C
ot
The following image shows the Work Item Details for a selected work item in a Work items list. You
can view and respond to work items using the Work Item Detail View modal window:
N
o
D

The Work Item Detail View window displays the following items:
 Manage Work Item: This drop-down list has options to handle the work item. Select Take
Ownership to take ownership of the item. Alternatively, you can select the Hold option to
put it on hold. Click Go to submit the response. By setting the

Wonderware Training
Section 1 – Controls Overview 3-7

AllowAutoownershipOnRowClick property, you can allow users to take ownership on


selection of the work item.
After you take ownership of a work item, you can have the option to view all user
responses through the View All Users option. The Work items list property of Hide
Response should be set as No to view all users responses.
 Custom Document View: This view is at the left of the detailed view. It displays
information on Execution Details.
 Work Item Action Controls: These controls are located at the right of the detailed view.
The controls and the content depend on the activity type. The figure below displays

y
controls for the Approval work item with a field for comments. The controls and information
displayed for an activity also depend on the properties of the activity as set in the process.
For example, if the property Hide Responses for a group approval activity is set to False,
users will also be presented with a link to view comments from other approvers.

op
Work Items List Toolbar
The Work Items List toolbar has options that enable users to manage how work items are
delivered and when they are delivered, and to assign alternate users in their absence. An
additional option for queue enables queue owners to access the settings to their queues.

 C
Show Queue: This option opens the appropriate Queue Control window for the folder
from which it is accessed. To open the main Queue Management window with the list of all
queues, select Inbox and click the Show queue button. To open the Participant Tab
ot
window for a queue, select the queue folder and click the button.
 Show alternate actor: This option opens the Alternate Actors setting window, which can
also be accessed from the Process Designer.
 Show resource calendar: This option opens the Resource Calendar window for the
active resource. You can set the resource calendar preferences here.
Set preferences: This option allows actors to set preferences for the delivery of work
N


items. It opens the Personal Work item delivery preferences window, where you can
disable the delivery channels for which you do not wish to receive work items.
To disable a channel, select the check box corresponding to it. For example, if you are
traveling and may not have access to the web, select the WebWorkList option to stop work
items from being delivered in the Work items list. Click Set Preferences to save.
o

This option also allows users to specify the language settings for the user interface. In Select the
culture Language, select the language. Click Set Culture to set the language preference.

Note: The Culture drop-down list displays a list of languages. However, for the preference to take
D

effect, the language strings for the corresponding language must be available in Workflow
Management folders. Workflow Management does not provide default support for all languages in
the drop-down list.

Workflow Management 2019


3-8 Module 3 – Working with Workflow Management Controls

Enable Multi Select: The Enable Multi Select button provides users with options of acting on
items as a batch. An additional option is available when the items are grouped.

The Multi Select option is not supported for Resource Set, Information, and InvokeForm activities.

y
op
C
ot
N
o
D

Wonderware Training
Section 2 – Workflow Management Calendar Control 3-9

Section 2 – Workflow Management Calendar Control


This section discusses the Organizational and Resource calendars. It defines the different
options available in the Calendar control: create shifts, configure working/nonworking days in a
week, and configure holidays. It also describes how to use the Calendar control with an Approval
activity.

Calendar

y
The Workflow Management Calendar interface enables the creation of hierarchical organization
and resource calendars. The calendars are used to determine availability of resources, calculate
timeouts, and perform other scheduling functions.

op
C
ot
The user can add a new calendar or set the resource calendar.

Multilevel and Hierarchical Calendars


Workflow Management Calendar allows you to create multilevel and hierarchical calendars. You
can define multiple child calendars that inherit from the parent calendars. For example, in an
organization that spans across multiple geographical locations, you can define an organization-
N

wide master calendar. You can define the work hours across the organization using the master
calendar. You can create a separate child calendar for each work location to record the unique
work hour requirements for that region. The child calendar inherits the settings of the master
calendar and can be customized.
Additional levels of customized calendars, which inherit from the respective parent calendars, can
be configured in this manner. The lowest level of calendars that can be defined by extending this
o

process are called the Resource Calendars.

Configure the Calendar


D

After creating the new calendar you need to configure it with the required parameters. There are
three grids in this section: General, Days, and Date.
To configure the calendar, click Set Work Slot. The Set Work Slot dialog box appears. Update the
work slot, and then click Close.

Workflow Management 2019


3-10 Module 3 – Working with Workflow Management Controls

Configure General Settings, Including Shifts


You can set the general work hours for the calendar in the General grid.
To configure General Settings, click Set Work Slot. The Set Work Slot window appears. In the Set
Work Slot window, do the following: In the Name field, type a name for the work shift. In the From
field, select the start time of the shift. In the To field, select the end time of the shift. You can add
more rows for setting shift details by pressing the Tab key or using the grid shortcut menu. After
making the required work hour settings, click Close.

Configure Day Settings, Including Working/Nonworking Days and Holidays

y
You can set the work hours for specific days in the Day grid. For example, you can specify
alternative work hours for Saturdays. You can also set Sundays or any other day of the week as
the weekly day off.

op
To configure Day Settings, click Set Work Slot. The Set Work Slot window appears. In the Set
Work Slot window, do the following: In the Day list, select a day of the week. Click the Get Details
button. The grid gets populated with existing shift details, if any. You can edit the existing shift
details. For the Consider as Holiday option, select Yes if you want to consider the selected day as
a holiday. In the Name column of the grid, type a name for the work shift. In the From column of the
grid, specify a start time for the shift. In the To column of the grid, specify the end time of the shift.
You can add more rows for setting shift details by pressing the Tab key or using the grid shortcut

Configure Date Settings


C
menu. After making all the work hour settings, click Close.

You can set the work hours for a specific date in the Date grid. For example, you can select a date
and set it as a holiday. To configure Date settings, click the Set Work Slot grid. The Set Work Slot
ot
window appears. In the Date field, select a date. Click the Get Details button. The grid gets
populated with existing shift details, if any. You can edit the existing shift details. For the Consider
as Holiday option, select Yes if you want to consider the selected day as holiday. In the Name
column of the grid, type a name for the work shift. In the From column of the grid, specify a start
time for the shift. In the To column of the grid, specify the end time of the shift. You can add more
rows for setting the shift details by pressing the Tab key or using the grid context menu. After
configuring all the work hour settings, click Close to close the window.
N

Note: These settings provide a great deal of flexibility in creating new calendars. If you inherit the
settings from a parent calendar, you only need to change the parameters that need to be alerted.
This saves the time and effort that would otherwise be required for setting all the parameters
individually for a calendar.
o
D

Wonderware Training
Section 2 – Workflow Management Calendar Control 3-11

Configure a Child Calendar


You can configure a child calendar that will inherit the settings of the specified parent calendar.
While creating the calendar, in the Inherit Calendar field, select the appropriate parent calendar.
Click Save. Configure the settings for this calendar in addition to the settings inherited from the
parent calendar.

View the Parent Calendar


In the Inherit Calendar field, select the parent calendar. Click the Inherit Calendar View button. The
display of the view button is controlled by the CanViewCalendar property. The default value for this

y
property is false.

Inherit from a Parent Calendar

op
You can create a new calendar by inheriting properties from an existing parent calendar. If it is not
inherited from any parent calendar, the new calendar becomes the parent calendar. Expanding the
process of inheriting from a top-level calendar, you can create a hierarchy of calendars. For
example, for an organization that operates in several countries, you can have a separate calendar
for each country. Under the parent calendar for a country, you can have a number of calendars for
each of the regions in the country. Under the calendar for each region, you can have a number of
calendars for each department. Similarly, within each department calendar, you can have a

C
resource calendar for each user in the department.

Sample Scenario
If a task is assigned to a user and there is no response after 5 working days (excluding holidays),
a timeout reminder should be sent to the user. To create the reminder, first create a calendar. Add
a General shift that covers 24 hours (Day Shift: 9 a.m. to 6 p.m.; Night Shift: 6 p.m. to 9 a.m.). Set
ot
holidays as required. Associate this calendar with any human activity. If you want to set a timeout
for a resource, you have to calculate the timeout based on the following:
 Shift timing of the resource
 Holidays/weekly off
The resource calendar can also be overridden, based on the Calendar Property settings for the
N

activity.
o
D

Workflow Management 2019


3-12 Module 3 – Working with Workflow Management Controls

Calendar Control with an Approval Activity


You can set a Calendar to calculate the timeout for the Approval activity. To access this window,
click the button for the Set Calendar for Timeout property. The property window appears.

y
op
This window lists the available calendars in a tree structure, with lower-level calendars nested


C
within the respective top-level calendar. You can click a calendar to select it for setting.
There are two buttons in this window:
No Calendar: Click to indicate that there is no calendar set for the activity
Set Calendar: Click to set the selected calendar
ot
You can select the Use Resource calendar if available check box to enable the use of resource
calendars if none are displayed in this window for selection.
N
o
D

Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-13

Lab 8 – Using Calendar for Timeout and


Escalations

Introduction
In this lab, you will extend the Lab 7 workflow by adding the escalation and timeout functionality.
When a checklist task is sent to an operator, the operator should respond within the given time
limit. If the operator fails to act on the checklist within the specified time, the system will send a

y
reminder to the operator. If the operator still does not act on the checklist within the specified time,
the system will escalate the task by sending a notification to the supervisor. To configure these
functions, you will set up a Calendar for an Approval activity, a Timeout Warning for an activity, and

op
a Timeout for an activity.

Objectives
Upon completion of this lab, you will be able to:
 Create a calendar
 Add shifts, holidays, and working hours on a calendar


C
Set up a calendar for Approval activity
Set up a Timeout Warning for an activity
Escalate to a supervisor when activity timeout occurs
ot
N
o
D

Workflow Management 2019


3-14 Module 3 – Working with Workflow Management Controls

Export and Import a Workflow


First, you will export the Lab7 workflow, so that you can use it as a base for the workflow you will
create. Then, you will create a new workflow and import the exported Lab7 workflow.
1. Log in as admin.
2. Export the Lab7 workflow to the C:\Training folder.

y
op
3. On the Workflows page, create a new standard workflow with the following title and
description:
:
Title: Lab8
Description:

C
Using Calendar for Timeout and Escalation
ot
The Process Designer appears.
Note that at the top-right of the window, TrainingRepository / Lab8 / 1 is visible.
N
o
D

Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-15

4. Import the Lab7_1.xml file from C:\Training.

y
op
Configure the Workflow
C
Now, you will configure the workflow you imported. You will remove the activities you do not need,
add additional Information activities, and configure the linking lines and activities.
ot
5. Remove the Choice activity named Notification Choice and the Information activity named
Notify Safety Officer on Spill.
N
o
D

Workflow Management 2019


3-16 Module 3 – Working with Workflow Management Controls

6. Rearrange the layout as shown below:

y
op
7. Add a linking line between the Start activity and the Decision activity named Decision on
Spill Type.

C
8. Add one Information activity to the right of Notify Operator on Spill.
9. Add another Information activity to the right of the Information activity you just added.
ot
Note: The numbers with your activities may differ from those shown in this manual. Use the
numbers shown in this manual to identify the activity being addressed even if yours has a
different number.
N
o
D

Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-17

10. Use the Activity Properties pane to configure the Information6 and Information7 activities
as follows:
Information6

Name: Notification - Action Reminder to Operator


Description: Send Reminder to Operator for Pending Action
Assign Actor(s): Joe (Operator 1)

Information7

y
Name: Escalate to Supervisor on Check-List
Description: Notification that operator has not taken action
Assign Actor(s): Lenny (Supervisor 1)

op
C
ot
N
o
D

Workflow Management 2019


3-18 Module 3 – Working with Workflow Management Controls

Next, you will add linking lines as you prepare to configure the timeout warning to notify the
operator of a pending action and to escalate it to the supervisor if the operator still does not act
after the timeout warning.
11. Add a linking line between the Check-List activity named Check-List on Spill and the
Information activity named Notification - Action Reminder to Operator.
12. Right-click the linking line and select Timeout Warning - Action.
13. Add another linking line between the Check-List on Spill activity and the Information activity
named Escalate to Supervisor on Check-List.

y
14. Right-click the linking line and select Timeout - Action.

op
C
ot
N
o
D

Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-19

Next, you will configure the Check-List on Spill activity because that is the activity that will require
action. You will configure the activity to send a warning after 5 minutes to the assigned user if the
user has not performed the task. If the assigned user still has not acted after 6 minutes, the
warning will be escalated to the supervisor. You are using reduced times to quickly see how the
function works. Actual times will be much longer.
15. Select the Check-List on Spill activity, and in the Activity Properties pane, scroll down and
expand Escalation & Timeout.
16. Scroll down and in the Timeout warning for Activity field, enter 0.00:05:00 to set a 5-minute
timeout warning.

y
The format is D.HH:MM:SS (day, hour, minutes, seconds).
17. In the Timeout for Activity field, enter 0.00:06:00 to set a 6-minute timeout.

op
C
ot
N

18. Click Save.


o
D

Workflow Management 2019


3-20 Module 3 – Working with Workflow Management Controls

Publish and Test Run


Now, you will test the workflow.
19. Click Publish and Test Run.
The Analyst’s View appears.

20. Refresh the page.


The Check-List on Spill activity is awaiting approval.

y
op
C
ot
21. Hover over the activity to get some information like the time the activity was started.
N
o
D

22. To get more details, click the Check-List on Spill activity.

Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-21

23. On the Step Details tab, scroll down to the bottom of the window to see the time scheduled for
the timeout and other timeout-related information.

y
op
24. Close the window and wait for the time you saw on the Step Details tab that the timeout
should be triggered.

25. When the time has passed, refresh the Analyst’s View.

C
Note that the warning was sent to the operator. If too much time has passed, the warning may
also be escalated to the supervisor.
ot
N
o
D

Workflow Management 2019


3-22 Module 3 – Working with Workflow Management Controls

26. Log in as Joe.


The notification is listed in the Work items list.
The task is not listed because it was removed when Joe did not act within the 6 minutes you
set for the timeout.

y
op
27. Log in as Lenny.
28. Use the Reports menu to check the completed workflow.
29. Refresh, if necessary.
Note that the warning was escalated to the supervisor because the operator did not act.

C
ot
N

30. Switch to the Inbox.


The notification is listed in the Work items list.
o
D

Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-23

Configure Calendar
Now, you will create a calendar for timeout and escalation. A calendar is also useful when
employees are working in different time zones and you need to assign tasks. Working hours in one
time zone may be nonworking hours in another.
31. In the Enterprise Console, in the hamburger menu, click Settings | Calendar.

y
op
The Calendar window appears.
C
ot
N
o

You can create an organizational calendar or a resource calendar. You will create an
organizational calendar.
D

Workflow Management 2019


3-24 Module 3 – Working with Workflow Management Controls

32. In the Name field, enter MasterCalendar.


33. In the Time Zone drop-down list, select Pacific Time (US & Canada).
You can select your own time zone.

y
op
34. Leave the Inherit Calendar field blank because you are not going to use information from
another calendar.
35. Click Save.
A bottom portion with tabs is added to the calendar.

C
ot
N
o
D

Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-25

36. Click the Set Work Slot button.


The Set Work Slot dialog box appears.
37. Click under Name and enter Shift1.
38. Click under From and in the drop-down list, scroll down and select 8 a.m. to indicate the start
time.
39. Click under To and in the drop-down list, scroll down and select 4:30 p.m. to indicate the end
time.

y
op
C
40. Press the Tab key to add the work slot to the list.
ot
N
o
D

41. Click Close.

Workflow Management 2019


3-26 Module 3 – Working with Workflow Management Controls

The Shift1 work slot is added to the General tab.

y
op
Next, you will configure the working and nonworking days.
42. Click the Days tab.

C
ot
N

43. Click the Set Work Slot button.


o
D

Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-27

The Set Work Slot dialog box appears.


44. In the Day area, in the Select a Day drop-down list, select Saturday.

y
op
45. In the Consider as Holiday area, click the Yes option.

C
ot
N

46. Click Save & Close.


o
D

Workflow Management 2019


3-28 Module 3 – Working with Workflow Management Controls

The Saturday holiday is added to the Days tab.


47. Repeat Steps 43 to 46 to add Sunday as a holiday.
These days will be treated as nonworking days.

y
op
Now, you will create a calendar with a specific date for a holiday.
48. Click the Date tab.
49. Click the Set Work Slot button.

date after today. C


50. In the Set Work Slot dialog box, in the Date area, click the calendar

51. In the Consider as Holiday area, click the Yes option.


button and select any
ot
N
o
D

52. Click Save & Close.

Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-29

The holiday you specified is added to the Date tab.

y
op
This date will be treated as a nonworking day.

53. Click the back arrow to see the calendar listed.

C
ot
N
o
D

Workflow Management 2019


3-30 Module 3 – Working with Workflow Management Controls

Next, you will use MasterCalendar in your workflow.


54. Go to the Workflows page.
55. Unpublish Lab8.
56. In the workflow, click the Check-List on Spill activity.
57. In the Activity Properties pane, scroll down and expand Escalation & Timeout.
58. Under the Set Calendar for Timeout property, click the gray button to the right of the field.
The Check-List on Spill -Set Calendar window appears with MasterCalendar listed.

y
op
C
ot
N

59. Click MasterCalendar.


60. At the bottom of the window, check the Use Resource calendar if available check box.
o
D

You were not instructed to create a resource calendar, which you can use to assign tasks to
users, but generally check this check box in case one is created.

Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-31

61. Click Set Calendar.


This calendar will be used for timeout and escalation.
62. Scroll down and expand Escalation & Timeout.
Note that in the Set Calendar for Timeout field, MasterCalendar is selected.
63. Scroll down to the Timeout warning for Activity field.
Note the 0.00:05:00 timeout warning setting, and in the Timeout for Activity field, note the
0.00:06:00 timeout setting.

y
op
C
ot
N

64. Click Save.


o
D

Workflow Management 2019


3-32 Module 3 – Working with Workflow Management Controls

Publish and Test Run


Now, you will test the timeout. The results will depend on the time zone you set earlier and your
time zone.
65. Click Publish and Test Run.
The Analyst’s View appears. The Check-List on Spill is awaiting approval.

y
op
66. Hover over the activity to get some information like the time the activity was started.

C
ot
67. To get more details, click the Check-List on Spill activity.
68. On the Step Details tab, scroll down to the bottom of the window to see the time the timeout is
N

scheduled and other timeout-related information.


o
D

The wait time is 5 minutes for an action, and then escalation after 6 minutes, but the results
may show a longer time depending on the time zone you set and your time zone. Also, if you
set the working hours in a different time zone than yours, the timeout activity may be in
nonworking hours for your time zone.

Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-33

69. Close the window and wait for the time you saw on the Step Details tab that the timeout
should be triggered if the configured hours are during working hours.
70. If the workflow will be triggered during class time, use the Reports menu to check the
completed status.

y
op
C
ot
N
o
D

Workflow Management 2019


3-34 Module 3 – Working with Workflow Management Controls

y
op
C
ot
N
o
D

Wonderware Training
Section 3 – Workflow Management Queue 3-35

Section 3 – Workflow Management Queue


This section describes the Workflow Management queue. Discussions address the Manual
Dispatch—LIFO and FIFO, and the Automatic Dispatch—Random, Round Robin, and Least
Used Resource. There are also explanations of how to use automatic and manual queues in a
workflow.

Queue Management

y
You can use Queue to assign tasks to groups of actors and to include queues consisting of
participants as part of their process. The Queue feature is generally used by the Workflow
Management process administrators and owners. The Queue feature provides a greater level of
flexibility in the assignment of tasks to the participants.

op
Queue Features
Queue Management has the following features:
 Supports push-pull patterns
 Specifies role or user as participants


Escalates Queue levels

C
Provides access rights for role or user

Allocates tasks to actors automatically or manually


You can perform the task allocation as follows:
 Automatic: The task allocation is done automatically using defined algorithms. The
ot
assignment is done using the Round Robin, Random, or Least Used methods. This push
pattern is the default setting.
 Manual: The task allocation is done manually. In this case, you can view and pick a task
from the queue. Alternatively, the users can be allowed to use a button in the Work items
list to get the next available task in the queue. In this case, the users cannot view the tasks
in the queue, but can click the button to get the next available task in the queue. This is the
N

pull pattern as opposed to the push pattern, where the queue assigns tasks.
 Combination: The task allocation is done using a combination of automatic and manual
methods.
You can use Queues in workflows to set the recipients of activities as follows:
 Assign tasks to resources directly using the Assign Actor(s) property
 Assign tasks to queues using the Assign Queue(s) property
o

 Assign tasks using both properties.

Note: If both properties are set, both the resources and the queues are assigned the task directly.
D

The resource getting the task from the queue will have to act on it. In each case, the respective
escalation or timeout setting will apply.

Workflow Management 2019


3-36 Module 3 – Working with Workflow Management Controls

Dispatch Patterns Tab


The Queue Management Dispatch Patterns tab provides the settings for dispatch patterns. You
can either configure automatic dispatch settings or manual dispatch settings.

y
op
C
ot
N
o
D

Wonderware Training
Section 3 – Workflow Management Queue 3-37

Manual Dispatch
The following settings are available for manual (or pull type) dispatch of tasks:
 Show "Get Next Item" in Work Item: Check this option to enable the display of the Get
Next Item option in the Work items list. Participants can click this option after completing
the allocated task to get the next task in the queue.
 Set "Get Next Item Properties": Specify the order in which tasks in the queue must be
sorted by selecting the parameters in this drop-down list and clicking Set. The parameters
are separated by commas and can be applied in ascending or descending order by
selecting Asc or Desc in the drop-down list.

y
 Pattern: Specify the manual dispatch pattern by selecting one of the following radio
buttons:
 No Provider: Specify that no provider is available for dispatch. This option cannot be

op
selected for both Automatic and Manual dispatch. Dispatch pattern has to be set for at
least one mode.
 FIFO: Set the queue to allow users to access the tasks on a First In First Out basis.
 LIFO: Set the queue to allow users to access the tasks on a Last In First Out basis.
After setting the Dispatch Patterns, click Update to save the settings.

Automatic Dispatch


C
The following settings are available for automatic (or push type) dispatch of tasks:
Consider Same Resource: Check this option to allocate a task that is similar to a
previously allocated task to the same user to whom it was allocated in the first case. This
can also be used to consider the same user for tasks that are repeated.
ot
 Matching Global Field: Specify the global field to be used to identify if a task is similar to
an earlier one or is repeated.
 Search: Specify the location to search for the matching task.
Queue: Search for a matching task in the queues.
Work Item: Search for a match in the Work items list.
N

 Pattern: Specify the automatic dispatch pattern by selecting one of the following radio
buttons:
 No Provider: Specify that no provider is available for dispatch. This option cannot be
selected for both Automatic and Manual dispatch. Dispatch pattern has to be set for at
least one mode.
 Round Robin: Enable round robin task allocation where the participants will be
o

allocated tasks by rotation.


 Least Used Resource: Ensure that the queue control assigns the task to the
participant who has the lowest workload.
Random: Set the queue to allocate the tasks randomly.
D

Workflow Management 2019


3-38 Module 3 – Working with Workflow Management Controls

Using Queues in Workflows


In the Activity Properties pane of all activities, there is an option called Assign Queue(s). You can
use this property to specify a queue to which the corresponding work item will be assigned.
To assign a queue for an activity, in the Process Designer for Workflow, right-click the resource
activity, and then select Activity Properties. In the Activity Properties pane, click the button for the
Assign Queue(s) property. In the window that opens, select the queues from the Available Queues
list box. To select multiple queues, click each queue while pressing the Ctrl key.
After selecting the required queues, click the [>] button to move them to the Selected Queues list
box. You can click the [>>] button to select all the queues and move them to the Selected Queues

y
list box. You can remove any queue from the selected list. Select the queue, and then click the [<]
button. You can remove all the queues by clicking the [<<] button. After adding the required
queues, click the Assign button to assign the activity to the selection. Click the Close button to

op
close the window without saving the selection.

Difference Between Direct Task Assignment and Task Assignment Through


Queue
A task can be assigned to multiple resources directly whereas only one resource will get the task
from a queue.

C
ot
N
o
D

Wonderware Training
Lab 9 – Creating Queues 3-39

Lab 9 – Creating Queues

Introduction
In this lab, you will create an automatic queue with an Automatic Dispatch Pattern for operators
and a manual queue with a Manual Dispatch Pattern for supervisors. In all previous labs, tasks
were sent to individuals. With queues, the administrator or queue owner can send tasks to teams
and anyone in the team can act on the task, based on the selected dispatch pattern.

y
Objectives
Upon completion of this lab, you will be able to:

op
 Create a queue
 Add users and roles in a queue
 Set up a queue with an Automatic Dispatch Pattern
 Set up a queue with a Manual Dispatch Pattern

C
ot
N
o
D

Workflow Management 2019


3-40 Module 3 – Working with Workflow Management Controls

Import a Workflow
First, you will create a workflow and import the previously exported Lab3 workflow, so that you can
use it as a base for the workflow you will create.
1. Log in as admin.
2. On the Workflows page, create a new standard workflow with the following title and
description:
:
Title: Lab9

y
Description: Queue Management

The Process Designer appears.

op
Note that at the top-right of the window, TrainingRepository / Lab9 / 1 is visible.
3. Import the Lab3_1.xml file from C:\Training.

C
ot

Remove Assigned Users


N

In the Activity Properties pane, in the Configuration area, instead of using the Assign Actor(s)
property, you will use the Assign Queues property to allocate a task to a resource in a group or
team. You can add user roles or individuals to a Workflow Management queue. You will use the
Assign Queues property to assign tasks later, but first you must clear some of the user settings.
First, you will remove the assigned user.
o

4. In the workflow, select the Approval activity named MaintenanceApproval and open the
Activity Properties pane.
5. In the Actors area, under the Assign Actor(s) property, click the gray button to the right of the
D

field.

Wonderware Training
Lab 9 – Creating Queues 3-41

At the bottom-left of the Assign Actor(s) window, note the SK User is Ray.

y
op
6. At the bottom-right of the window, click Clear, and then click Update.
7. Click Save.
A red circle with a white exclamation mark appears on the MaintenanceApproval activity to
indicate that the activity is no longer configured.

C
ot
8. Repeat Steps 4 to 7 for the Approval activity named ProductionSupervisorApproval.

Create a Queue
Next, you will create and configure two queues.
N

9. In the Enterprise Console, in the hamburger menu, click Settings | Queue Management.
o
D

Workflow Management 2019


3-42 Module 3 – Working with Workflow Management Controls

The Queue Management page appears.

y
op
10. At the top-right of the page, click the New Queue button.
The Name and Description fields appear at the bottom of the page.
11. In the Name field, enter, MaintenanceQueue.
12. In the Description field, enter Automatic Assignment.

C
ot
N
o
D

Wonderware Training
Lab 9 – Creating Queues 3-43

13. Click Add.


The MaintenanceQueue section appears with the Participant tab selected.
Notice admin at the top-right of the page, indicating that the administrator created the queue.
The check marks under the abbreviations indicate the administrator has all the rights, which
are explained at the bottom of the page.

y
op
C
ot
You can add a user or role.
14. At the bottom-right of the page, click Add Users.
The Add Users window appears.
N
o
D

Workflow Management 2019


3-44 Module 3 – Working with Workflow Management Controls

15. To the right of the Select Users field, click the User Lookup button to open the User
Lookup window.
16. In the Search For field, enter Robert and confirm the SK User Name is selected in the drop-
down list.
17. Click Search.
The name Robert appears in the Available Resources area.

18. Select the name and click the right arrow button to move the user to the Selected

y
Resources area.

op
C
ot
19. Click Update.
The user Robert is added to the Select Users field.
N
o
D

20. Click Update.

Wonderware Training
Lab 9 – Creating Queues 3-45

The user Robert is added to the Participant list. Notice that the user has no rights, as
indicated by the x marks in all the columns.

y
op
C
21. At the bottom-right of the page, click Add Roles.
The Add Roles window appears.
ot
N
o
D

Workflow Management 2019


3-46 Module 3 – Working with Workflow Management Controls

22. To the right of the Select Roles field, click the Role Lookup button to open the Role
Lookup window.
23. Search for Engineers.
The role Engineers appears in the Available Roles area.

24. Select the role and click the right arrow button to move the role to the Selected Roles
area.

y
op
25. Click Update.
C
The role Engineers is added to the Select Roles field.
ot
N
o

26. Click Update.


D

Wonderware Training
Lab 9 – Creating Queues 3-47

The role Engineers is added to the Participant list.


In the Participant list, notice that the Engineers role does not have any rights, as indicated by
the x marks in all the columns.

y
op
C
27. To see the members of the Engineers role, right-click Engineers and select View Users.
ot
A Queue window with the users in the role appears.
N

28. Close the Queue window.


o

29. To assign rights, right-click Engineers.


Note that you can also use this menu to Set Priority and Delete.
D

30. Click Set Access Rights.

Workflow Management 2019


3-48 Module 3 – Working with Workflow Management Controls

A Queue window with the Runtime Access Rights appears.


There are two categories. At the bottom of the window, Designtime Access Rights can only
be used by the admin user or queue owner because the queue owner has all rights and can
assign rights to other users or make them queue owners.
31. In the Runtime Access Rights area, check the following:
 Can View New / Unallocated Items
 Can Ad Hoc Pick Task
 Can Put Back in Queue

y
 Can View Allocated Items
 Can Plan Queue Item
 Can Move to Different Queue

op
C
ot
32. Click Update.
The rights for the Engineers role are updated, as indicated by the check marks.
N
o
D

Wonderware Training
Lab 9 – Creating Queues 3-49

Allocate Dispatch Patterns


Now, you will configure dispatch patterns for the Queue. A Queue Dispatch Pattern decides how
the task will be delivered in the Queue user's Work items list or Inbox. First, you will allocate a
dispatch pattern using the Automatic Dispatch Pattern.
33. Click the Dispatch Patterns tab.
Notice the Automatic Dispatch section and the options below it.
In the Search area, notice that Queue is selected.

y
op
C
ot
34. In the Pattern area, select Random.
This allows the task to be randomly assigned to anyone in this queue.
N
o
D

Workflow Management 2019


3-50 Module 3 – Working with Workflow Management Controls

35. Click Update.


The dispatch pattern is configured.
The MaintenanceQueue section reappears with the Participant tab selected.

y
op
36. Click the Back Arrow .

Automatic Assignment.
C
The Queue Management page displays the MaintenanceQueue in the list with an

37. At the top-right of the page, click the New Queue button.
ot
N

38. At the bottom of the page, in the Name field, enter SupervisorQueue.
39. In the Description field, enter Manual Allocation.
o

40. Click Add.


D

The SupervisorQueue section appears.


41. At the bottom of the page, click Add Roles.
The Add Roles window appears.

42. To the right of the Select Roles field, click the Role Lookup button.

Wonderware Training
Lab 9 – Creating Queues 3-51

43. In the Role Lookup window, search for Supervisors and move the role to the Selected
Roles area.

y
op
44. Click Update.
Supervisors is added to the Select Roles field.

C
ot
N

45. Click Update.


o
D

Workflow Management 2019


3-52 Module 3 – Working with Workflow Management Controls

The Supervisors group is added to the Participant list.

y
op
46. To assign rights, right-click Supervisors and select Set Access Rights.
47. In the Runtime Access Rights area, check the following:


Can View New / Unallocated Items
Can Ad Hoc Pick Task
Can Put Back in Queue
Can View Allocated Items
Can Plan Queue Item
C
ot
 Can Move to Different Queue
N
o
D

48. Click Update.

Wonderware Training
Lab 9 – Creating Queues 3-53

The rights for the Supervisors role are updated, as indicated by the check marks.

y
op
Next, you will allocate a dispatch pattern using the Manual Dispatch pattern.
49. Click the Dispatch Patterns tab.

selected.

C
In the Automatic Dispatch section, in the Pattern area, notice that the No Provider option is

You will keep this default setting because you will be using manual dispatch.
ot
N
o
D

Workflow Management 2019


3-54 Module 3 – Working with Workflow Management Controls

50. In the Manual Dispatch section, scroll down to the Pattern area.
Notice that besides No Provider, the options are FIFO (first in, first out) and LIFO (last in, first
out).
51. Click the FIFO option.

y
op
52. Click Update.
The SupervisorQueue section reappears.
C
ot
53. Click the Back Arrow .
The Queue Management page displays the two queues you have created:
MaintenanceQueue with Automatic Assignment and SupervisorQueue with Manual
Allocation.
N
o
D

Wonderware Training
Lab 9 – Creating Queues 3-55

Assign a Task with the Assign Queues Property


Now, you will assign two approval activities to the automatic and manual queues.

54. In the hamburger menu, click Workflows .


55. Open the Lab9 workflow.
Notice the red circles with the white exclamation marks on the Approval activities.
56. Click the Approval activity named MaintenanceApproval.

y
In the Activity Properties pane, notice the red circles with the white exclamation marks on the
Assign Actor(s) and Assign Queue(s) properties.
57. Under the Assign Queue(s) property, click the gray button to the right of the field.

op
The MaintenanceApproval -Assign Queue window appears.

C
ot
N
o
D

Workflow Management 2019


3-56 Module 3 – Working with Workflow Management Controls

58. Select MaintenanceQueue and click the right arrow button to move the queue to the
Selected Queues area.

y
op
59. Click Assign.
The red circles with the white exclamation marks disappear in the Activity Properties pane.
60. Click Save.

C
The red circle with the white exclamation mark disappears from the MaintenanceApproval
activity. The activity has been assigned to MaintenanceQueue, which is the automatic queue.
ot
N
o
D

Wonderware Training
Lab 9 – Creating Queues 3-57

61. Repeat Steps 56 to 60 to assign the Approval activity named


ProductionSupervisorApproval to the SupervisorQueue, which is the manual queue.

y
op
Publish and Test Run C
Now, you will test the automatic queue assignment. You will publish the workflow a few times to
see the randomization of the assignment.
ot
62. Click Publish and Test Run.
You can also use the right-click menu to access the Publish and Test Run command.
The Analyst’s View appears and the Approval activity named MaintenanceApproval is
awaiting approval.
N
o
D

This assignment was automatic, so a random user was assigned.

Workflow Management 2019


3-58 Module 3 – Working with Workflow Management Controls

63. Click MaintenanceApproval and note the user assigned.

y
op
The next time you run this workflow, a different user may be assigned.
64. Close the Details window, and then close the Lab9 workflow.
65. On the Workflows page, unpublish the Lab9 workflow.
66. If you get the following message when you unpublish the workflow, click Pause, and then
close the confirmation message that the workflow unpublished successfully.

C
ot
N

67. Reopen the Lab9 workflow and click Publish and Test Run to assign a different user.
68. After you click Publish and Test Run, click Resume in the message that appears.
o

69. Repeat Steps 65 to 68 at least four times.


You will need multiple tasks later for assignments.
70. Use the Reports menu to check the Awaiting status and see who was assigned.
D

You will need to log in as these users later, so write down their names.

Wonderware Training
Lab 9 – Creating Queues 3-59

Next, you will test the manual queue assignment.


71. Log in to the Enterprise Console as one of the users that was assigned when you were
testing the automatic queue.
The user name and password will be the user’s name.
The user’s Inbox may list the task multiple times, depending on how many times it was
assigned to the user when you were testing the automatic queue.

y
op
72. Click a task in the Work items list and approve it to send it to the supervisor.
73. Approve any additional tasks in the list.
74. Log in as another user that was assigned when you were testing the automatic queue.

C
ot
75. Approve all the tasks to send them to the supervisor.
76. Repeat Steps 74 and 75 for any additional users that were assigned tasks.
N

77. Log in as the admin user.


In the left pane, the Work items list should display the Inbox and the queues, but no tasks.
78. If no queues are listed, click the Inbox or repeat Steps 65 to 68 as the admin user.
The queues should then appear.
o
D

Workflow Management 2019


3-60 Module 3 – Working with Workflow Management Controls

79. Click SupervisorQueue.


The list of tasks appear in the right pane.
The admin user can now assign the tasks manually.
80. Check the check box for the top task in the list and click the Allocate queue item button.

y
81. In the Allocate queue item window, move Garry to Selected Resources.

op
82. Click Allocate.
C
ot
A message appears confirming that the selected queue items were allocated successfully.
N

83. Close the message.


84. Click Close.
o

85. Repeat Steps 80 to 84 to assign the second task to another user.


86. Check the check box for the third task, and then click the Pick button to assign it to yourself as
the admin user.
D

Wonderware Training
Lab 9 – Creating Queues 3-61

A message appears confirming that the selected queue items were picked and assigned to a
user.

87. Click Close.

y
88. Assign another task to one of the users previously assigned a task.

op
89. Log in as the user that you assigned two tasks and note his two tasks.

C
ot
90. Log in as the admin user and in the Work items list, click SupervisorQueue, or log out, and
then log in again if it does not appear at first.
91. For the user who has two tasks, check the check box for one of the tasks.
92. Click the Recall allocated items button.
N
o

A message appears confirming that the selected queue items that were allocated have been
recalled. The item you recalled is now not assigned to anyone.
D

93. Click Close.

Workflow Management 2019


3-62 Module 3 – Working with Workflow Management Controls

94. Go to the Inbox for the user with two tasks, and check to see if the task has been removed.

95. Reassign the task to another user and check the user’s Inbox to see if the task was added.

y
op
C
ot
N
o
D

Wonderware Training
Section 4 – File Watcher Configuration 3-63

Section 4 – File Watcher Configuration


This section explains how to associate a workflow with Enterprise Console events and configure
a file operation for a File Watcher workflow.

Associating Workflow with Enterprise Console Events


To associate the workflow with a new Enterprise Console list event, select the workflow, and then
click Associate on the ribbon. You can also select and right-click the workflow, and then select

y
Create Associations. Click Enterprise Console and configure the following:
 Type: Select either List or List Item.
If List is selected, the following options are available:

op
 Event Details: Select the event to associate with the workflow
 List Name: Enter the list name or select it from the List Explorer
 List Item Name: Enter the list item name
 Effective From: Select the start date for the association
 Effective To: Select the end date for the association; only the events in this period will
trigger the workflow


C
Workflow Version: Select the workflow version from the list
If List Item is selected, the following options are available:
Event Details: Select the event to associate with the workflow
List Item Name: Enter the list item name and click the List Explorer button to access
the List Explorer, where you can select the required list:
ot
 Select the list to associate with the workflow
 Select the type of customer
 Select the list item lookup, which displays the field set as the Default Field, as well
as the field with the options to Display in Grid and Display in Lookup set as True
 Effective From: Select the start date for the association
N

 Effective To: Select the end date for the association; only the events in this period will
trigger the workflow
 Workflow Version: Select the workflow version from the list
Click Attach Event to associate the workflow with the new Enterprise Console list event. The
Association saved successfully confirmation message appears.
o

File Watcher
File Watcher can be quite useful in application integration, by monitoring incoming data files and
D

raising events. It listens to the file system change notifications and raises events when a file in a
directory changes. The component can watch files on a local computer or a network drive.
The File Watcher raises events when a file is created, renamed, updated, or deleted from the
specified folder. The File Watcher continuously monitors one or more folders and raises events
whenever the abovementioned file activities occur.

Workflow Management 2019


3-64 Module 3 – Working with Workflow Management Controls

File Watcher:
 Can be configured to watch for new files, renames, changes, and deletes
 Quickly and easily triggers workflows associated with the File Watcher Event
 Can watch multiple files at the same time
 Allows multiple folders to be added to the File Watcher list
 Can watch folders in the local system or in the network path
 Raises four events: Created, Changed, Deleted, and Renamed

y
File Watcher Operations
The File Watcher List is the basic component of the File Watcher that contains details of the folders
that have to be watched. It has options for maintenance of folders such as adding a new folder,

op
editing an existing folder, and deleting a folder.
Security rights are set for adding, editing, and deleting a folder. Only the logged-in user with rights
will be able to add, edit, or delete the folder for file monitoring.
To open the File Watcher List, in the Enterprise Console, click the Menu button, click Settings, and
then click File Watcher. The File Watcher List page appears with the following options:
 Add Folder: On the action bar, click New. The Add Folder wizard appears. Use this option

 C
to create a new folder in which you will add the files to be watched.
Edit Folder Configuration Settings: On the action bar, click Edit. The Edit wizard
appears. Use this option to set the folder configuration.
Delete: On the action bar, click Delete. A message to confirm the folder deletion appears.
ot
N
o
D

Wonderware Training
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow 3-65

Lab 10 – Creating a Backup Utility Using the


File Watcher Workflow

Introduction
In this lab, you will configure the File Watcher event for a workflow. You will configure a directory so
that when there is a change in the directory, such as a file is created, deleted, renamed, or
modified, the workflow can be triggered. Whenever a maintenance report is published in a defined

y
reports directory, Workflow Management triggers the workflow and makes a backup of the report
and places it in a preconfigured backup directory. When copying the report to the directory is
successful or unsuccessful, the operator is notified. In this lab, you will also use Expression Builder

op
to use a formula such as a Concat function to join two strings together.

Objectives
Upon completion of this lab, you will be able to:
 Set up a directory for File Watcher
 Configure the File Watcher event for a workflow

C
Create a workflow that will be triggered after File Watcher is in action
Perform the file copy logic in a workflow
ot
N
o
D

Workflow Management 2019


3-66 Module 3 – Working with Workflow Management Controls

Create a File Watcher Directory and Workflow


First, you will create a File Watcher directory.
1. Ensure you are logged into Enterprise Console as the admin user, and then in the
hamburger menu, click Settings | File Watcher.

y
op
The File Watcher page appears.
C
ot
N
o

2. Click New .
D

Wonderware Training
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow 3-67

The Add Folder window you will use to configure the new File Watcher directory appears.
3. In the Title field, enter ReportWatcher.
4. In the Physical Path field, enter C:\Training\MaintenanceReports.
5. For Notify Filter, keep the default option Minimum to only generate an event when a file is
created, deleted, or renamed.
6. Leave the default for the other settings.

y
op
C
ot
7. Click Save.
A message appears confirming that the folder was created successfully.
N
o

8. Click Close.
D

Workflow Management 2019


3-68 Module 3 – Working with Workflow Management Controls

The ReportWatcher directory is added to the File Watcher list.

Now, you will create a workflow and use the directory you created.

y
9. On the Workflows page, click New .

10. In the toolbar that appears, click the FileWatcher button to create a File Watcher

op
workflow.
The New FileWatcher Workflow window appears.
11. Configure the workflow as follows:
:
Title: Lab10
Description: Creating a Backup Utility Using the File Watcher Workflow
Event Type:
Event Folder:
File Name/Pattern:
Created

C
C:\Training\MaintenanceReports\
*.* (This will search for any extension)
ot

12. Click Save & Continue.


N

A message appears confirming that the workflow was created successfully.


o

13. Click Close.


D

The Workflow Options window appears.


14. In the right pane, ensure Design the Workflow now is selected.
15. Click Finish.
The Process Designer appears.
Note that at the top-right of the window, TrainingRepository / Lab10 / 1 is visible.

Wonderware Training
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow 3-69

When you create a File Watcher workflow, an XmlVariable is automatically created.


16. With the Start activity selected, in the Activity Properties pane, in the Configuration area,
click the gray button to the right of the XmlVariables field.

y
op
The XmlVariables window appears with the FileWatcherXMLData variable selected. Note
that the File area displays the EventType, FileName, and FilePath.

C
ot
N
o

17. Close the XmlVariables window.


D

Workflow Management 2019


3-70 Module 3 – Working with Workflow Management Controls

18. In the Activities drop-down list in the left pane, select Integration Activities.
19. Drag the File Operations activity to the design mosaic, as shown below.
20. In the Activities drop-down list, select Human Activities and drag two Information activities
to the design mosaic, as shown below.

Note: The numbers on your Information activities may differ.

y
op
C
ot
Configure a File Watcher Workflow
Before you start to configure the workflow, you will declare a variable.
21. With the Start activity selected, in the Activity Properties pane, in the Configuration area,
under the Variables property, click the gray button to the right of the field.
N
o
D

Wonderware Training
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow 3-71

22. In the Variables window, in the blank Workflow Variables field, enter File.
23. In the Type drop-down list, select string.

y
op
24. Click Update.
25. Click Save.
You have declared the File variable.
C
Now, you will configure the File Operations and the two Information activities.
ot
26. Use the Activity Properties pane to configure the three activities you added as follows:
File Operations

Name: MaintenanceReportFile Backup


Description: File Operations Maintenance Report Backup
N

Information1

Name: Notify File Backup Success


Description: Maintenance Report Backup Notification
Assign Actor(s): Joe (Operator 1)
o

Information2

Name: Notify File Backup Failure


D

Description: Maintenance Report Backup Notification


Assign Actor(s): Joe (Operator 1)

Workflow Management 2019


3-72 Module 3 – Working with Workflow Management Controls

27. Add and label linking lines as shown below.

y
op
C
Next, you will initialize the File variable, which you will use with the File Operations activity. You
will specify the logic to concatenate the file path and the File Watcher XMLVariable file name, and
use the logic with the File Operations activity to create a backup of the file when the workflow is
triggered.
28. With the Start activity selected, in the Activity Properties pane, under the Initialize
Variables property, click the gray button to the right of Add.
ot
The Update Variable window appears with a Select link under Condition.
N
o
D

Wonderware Training
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow 3-73

29. Click the Select link.


A blank field and a window with Variables and XmlVariables listed appears. You may have to
click in the blank field before the window appears.
30. Expand Variables to display the existing variables.
Only one variable is listed.

y
op
31. Click Variable.File.
The Variable.File variable appears under Condition. Note that no value is assigned.

C
ot
You will assign a variable file next.

32. To the right of the Enter Value field, click to open a blank field.

33. To the right of the blank field, click to open the window with Variables and XmlVariables
N

listed.
o
D

Workflow Management 2019


3-74 Module 3 – Working with Workflow Management Controls

34. Click Build Expression.


The Expression Editor page appears.

y
op
C
35. In the Object Browser pane on the left, expand String.
ot
N
o
D

Wonderware Training
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow 3-75

36. Scroll down to Concat(System.String str0,System.String str1) towards the bottom of the
list.
Scroll over to see the complete name to ensure you select the correct formula. You will
concatenate or join this string with another.
37. Click this formula, and then move the mouse to the right pane.

y
op
38. Click again.
C
ot
The formula is generated automatically.
N
o
D

Workflow Management 2019


3-76 Module 3 – Working with Workflow Management Controls

39. At the bottom of the list, expand Workflow Instance.

y
op
40. Scroll down and expand XmlVariables.
41. Fully expand FileWatcherXMLData.

C
42. Click FilePath, and then in the right pane, within the parentheses, click the first argument,
ot
System.String[str0].
The FilePath node of the XML variable FileWatcherXMLData will replace the first argument
with:
XmlVariables.FileWatcherXMLData.FileWatcherEventData.FileWatcher.FilePath
N
o
D

Wonderware Training
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow 3-77

43. In the left pane, click FileName, and then in the right pane, within the parentheses, click the
second argument, System.String[str1].
The FileName node of the XML variable FileWatcherXMLData will replace the second
argument with:
XmlVariables.FileWatcherXMLData.FileWatcherEventData.FileWatcher.FileName

y
op
C
44. At the top-right of the window, in the Return Type drop-down list, select System.String.
ot
N
o
D

45. Click OK to return to the Update Variable window.

Workflow Management 2019


3-78 Module 3 – Working with Workflow Management Controls

Notice that the Value field has been updated.

y
op
46. Click OK.
C
The variable is now initialized. When the workflow is triggered, it will use the logic you
specified along with the File Operations activity you will configure next to create a backup.
ot
Now, you will create a source file in the directory you configured for the File Watcher workflow.
47. In the workflow, click the File Operations activity named MaintenanceReportFile Backup.
48. In the Activity Properties pane, in the Configuration area, under the Source Details
property, click the gray button to the right of the field.
The Source Details window appears.
N
o
D

Wonderware Training
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow 3-79

49. In the Protocol drop-down list, select File because you will use a local server.
Notice that the number of fields reduced with this selection.
50. For Location, in the second drop-down list, select Variable.
51. For Location, in the third drop-down list, select the variable File, which you initialized and
which is at the top of the list.
52. For Pattern, in the third field, enter *.*.

y
op
53. Click Submit.

C
You have configured the source file. This file is responsible for triggering the workflow when it
is created in the File Watcher directory named MaintenanceReports, which is in C:\Training.
54. Under the Destination Details property, click the gray button to the right of the field.
The Destination Details window appears.
ot
55. In the Protocol drop-down list, select File.
56. In File Explorer, navigate to C:\Training\Backups\ReportBackup and copy the file path.
57. Return to the Destination Details window, and for Location, in the third field, paste the path
you copied.
N

58. For Pattern, in the third field, enter *.*.


o
D

59. Click Submit.

Workflow Management 2019


3-80 Module 3 – Working with Workflow Management Controls

Note the updated Source Details and Destination Details fields.

y
60. Click Save.

op
Publish
Now, you will test the workflow. You will use Publish and not Publish and Test Run to publish a
File Watcher workflow.
61. In the workflow, select the File Operations activity named MaintenanceReportFile Backup.

C
62. In the menu bar, hover over Publish, and then click Publish.
ot
N

The Publish dialog box appears with a message that Lab10 with the version number was
published successfully.
o
D

63. Click Close.


64. In File Explorer, navigate to C:\Training\Scripts.
65. Select LAB-7 Example Script.txt and cut the file.

Wonderware Training
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow 3-81

66. Open the Training\MaintenanceReports folder and paste the file.


You can create any file in this directory to achieve the same result. Whenever a file is created
in this directory, the workflow will be triggered, and the logic within the workflow will copy this
file to the C:\Training\Backups\ReportBackup directory.

y
op
67. Navigate to C:\Training and drag the Lab5 and Lab6 XML files to the MaintenanceReports
folder.

C
ot
N

68. Open the C:\Training\Backups\ReportBackup folder to check if any backups of the files
were created there.
A backup is created when a workflow is triggered.

69. If there are no files in the folder, wait a few moments and click the Refresh button.

Note: The folder will eventually contain backup files.


o
D

Workflow Management 2019


3-82 Module 3 – Working with Workflow Management Controls

y
op
C
ot
N
o
D

Wonderware Training
y
op
C
Section 1 – Workflow Management Forms
Module 4 – Forms
4-3
ot
Section 2 – Form Controls and Containers Overview 4-13
Section 3 – Controls and Containers 4-23
Lab 11 – Working with Basic Form Controls 4-25
N

Section 4 – Forms Design Layout and Scripting 4-45


Lab 12 – Scripting in Form Controls 4-47
Section 5 – Invoking Forms 4-77
Section 6 – Using Invoke Form Activity and Getting Data from a Form 4-81
o

Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-87
D
4-2 Module 4 – Forms

Module Objectives
 Explain Workflow Management forms
 Discuss form properties
 Explain the difference between Draft and Publish modes for Forms
 Preview a form on different devices
 Discuss form controls and useful properties
 Design a form layout using Panel control
 Work with a Base Form control

y
 Use Scripting in forms

op
C
ot
N
o
D

Wonderware Training
Section 1 – Workflow Management Forms 4-3

Section 1 – Workflow Management Forms


This section introduces Workflow Management forms and describes the Forms platform and
Form properties tab options. The available tabs are Basic, Appearance, Advanced, and Scripts.

Introduction to Workflow Management Forms


Workflow Management Forms is a platform to design and use forms in your enterprise. The forms
platform uses the latest .NET framework and is developed using HTML5, CSS3, and Knockout

y
JavaScript. You can connect to forms with various Web APIs and through the Azure cloud
platform.

op
Forms Platform
The forms platform offers a what you see is what you get (WYSIWYG) display with an adaptive
layout and embeddable support for workflow enhancements.

C
ot
N
o
D

Workflow Management 2019


4-4 Module 4 – Forms

Forms, Forms Designer, and Script Editor are used to design the forms.

y
op
The key capabilities and workflow enhancements of Forms, Forms Designer, and Script Editor are
provided below.
Key Capabilities Workflow Enhancements
Web based forms:
 Cross-browser support
 Lookup infrastructure
 Reusable





C
Paperless process management
Invoke workflow processes
Forms events association
Route forms between roles and between users
Mail and mobile notifications
ot
 Audit trails

Form preview is available on mobile devices and provides the following features.
WYSIWYG Adaptive Layout Embeddable Support
Out of the box controls Unified user interface and user Custom Control Infrastructure
experience
N

Drag-and-drop support Single page – Model View


Native look and feel ViewModel (MVVM)
Smart controls
Works across devices
o
D

Wonderware Training
Section 1 – Workflow Management Forms 4-5

Form
Use Form as a basic container to place other containers and controls.

Properties
The properties for the form are grouped under the following tabs.
Basic
Property Description
Name Name that identifies the form.

y
This value is also used for the title of the form.
XML Node XML node mapped to the form.

op
Use this value to map a list to a form and a form to a workflow.
The default value is the value for the Name property without the spaces.
Note: If you edit this value later, it might affect the mapping between forms, lists,
and workflows.
Description Description for the form.
Show Save Button Show or hide the Save button for the form.
 Select Yes to show the save button for the form.

Save Button Text


C
 Select No to hide the save button for the form.

The default value is Yes.


Text for the save button of the form.
The default value is Finish.
ot
Appearance
Property Description Advanced
Label Position Position of the label for the child control.
 Select Default to allow the system to align the label for the child control. The
system aligns the label to the left of the child control.
N

 Select Left to align the label to the left of the child control.
 Select Top to align the label to the top of the child control.
 Select Right to align the label to the right of the child control.
 Select Bottom to align the label to the bottom of the child control.
 Select Suppress to hide the label for the child control.

The default value is Default.


o

Note: This property is applicable only if the Label Position property for the
child control is set to Default.
For example, if the Label Position property for the child control is set to
Default and the Label Position property for the Base Form is set to Top, the
D

label for the child control is aligned to the top of the child control.

Workflow Management 2019


4-6 Module 4 – Forms

Property Description
Label-Control Area Area occupied by the label and the control in percentage.
 Select Default to allow the system to set the label and the control areas.
 Select Custom to specify the label area. The control area is automatically set
based on the label area.
The default value is Default.
Note: If the value is Default and the control is placed on a container control,
the value of the Label-Control Area property of the container control
determines the area of the label for the control.

y
This is applicable only when the Label Position is set to Left or Right.
Auto-size Window Allow or deny the system to automatically size the window to the available screen
size on form load.

op
 Select Yes to allow the system to automatically size the window to the
available screen size on form load.
 Select No to deny the system to automatically size the window to the
available screen size on form load.
The default value is No.
Note: When the Auto-size Window is set as Yes, the following forms appear
as screen size on form load:
- Preview form
- Fill form
- Invoke form
- Reports
- Submitted form
C
ot
- Pop-up form, where the form is set as Pop-up
For a form set as Inline form, the Auto-size Window property is not
applicable.
When the Auto-size Window is set to Yes and Maximize the window on load
of Invoke Form activity is set to No, the Auto-size Window value overrides the
N

Invoke Form activity value.


While creating a list item, the Auto-size Window property is not applicable
even if the Auto-size Window property for the list associated form is set to
Yes.
Desktop View Only Turn off the user interface (UI) adjustment based on the screen width.
 If the value is set to Yes, the view generated for the Form is not responsive,
even if the value of the Adapt UI property at the container level is set to Yes.
o

 If the value is set to No, the view generated for the Form is responsive. You
can change the responsiveness at the container level using the Adapt UI
property.
D

The default value is No.

Wonderware Training
Section 1 – Workflow Management Forms 4-7

Property Description
Delay the Loading of Display contents when the container controls are accessed.
Containers  Select Yes to display the content of the container controls only when the
controls are accessed.
 Select No to always display the content of the container controls.

Consider a scenario where Delay the Loading of Containers option is


enabled and a Data Grid with Behavior property is set as Data Source. When
a script is used for the Options property to add options for a Drop-down
control, data will not be loaded in the drop-down control until the data grid is
loaded.

y
For more information on Options property, see Options.
Note: This property is applicable only if the Desktop View Only property is
set to Yes. This property is not supported in Work Tasks Pro App.

op
Custom Style Sheet Name of the custom style sheet.
For example, MyCustomStyleSheet for style sheet located at BPMUITemplates/
Default/Themes/<ThemeName>/ NextGenForms/css/custom/
MyCustomStyleSheet.css.
For information about using custom style sheets, see Custom Styles.

Advanced
Property
ID

Submit Form with Enter Key


Description

C
Reference identification code for the control. This value is automatically
generated and cannot be changed.
Allow or deny a user to submit a form by pressing the Enter key.
 Select Yes to allow a user to submit the form by pressing the Enter key.
ot
 Select No to deny a user to submit the form by pressing the Enter key.

The default value is Yes.


Note: This property is applicable only if the Button Type property of
Button control is set to Submit. If there are multiple Submit buttons in the
form, then the submit action with Enter key is performed on the first
Submit button. If the Submit button is the first control in the form, then
N

point the cursor to the input controls, and then press the Enter key to
submit the form.
Forms Parameters Form-level variables for use in workflows.
For information about using Forms Parameters, see Forms Parameters.
MQTT Topics Access external data through MQTT for use in forms.
 Click the Add button to add MQTT topic. Then click the Settings button
o

to configure the topic.


For more information, see MQTT Topic Configuration.
Enable Action Bar Enable or disable Action bar during runtime.
D

 Select the No check box if you do not want the Action bar to be enabled.
 Select the Yes check box if you want the action bar to be enabled.

When you select Yes, the Action Bar section appears.


For information about enabling action bar, see Action Bar.

Workflow Management 2019


4-8 Module 4 – Forms

Scripts
Property Description
On Form Load Run a script when a form is loaded.
For more information, see scripting guidelines for
On Form Load event.

Draft Mode
When you unpublish a form, the item status of the form changes from published to draft.

y
Publish Mode
Publish a form to use the form in a workflow.The form associated with a workflow is a Fill Form and

op
appears in the Fill Form page only when both the form and the workflow are published.
To publish a form, in the Enterprise Console, click the Menu button, and then click Forms. The
Forms page appears. Right-click a form, and then click Publish (or click a form, and then on the
Action bar, click Publish). The form is published and a message bar appears. Click Close. The
message bar closes.

Note: When you publish a form, the item status of the form changes from draft to published.

C
To publish multiple forms, in the Enterprise Console, click the Menu button, and then click Forms.
The Forms page appears. Select multiple forms, and then on the Action bar, click Publish. The
forms are published and a message bar appears. Click Close. The message bar closes.

Note: When you publish forms, the item status of the forms changes from draft to published.
ot
Preview Form
Use Preview to check the look and feel of the form at runtime and also to view the XML generated
for the form.
N

To preview only the form, in the Enterprise Console, click the Menu button, and then click Forms.
The Forms page appears. Right-click a form, and then click Preview Form (or click a form, and
then on the action bar, click View). The Preview dialog box appears. Check the look and feel of the
form. Click the Close button. The Preview dialog box closes.
To preview the form and the XML generated for the form, in the Enterprise Console, click the Menu
button, and then click Forms. The Forms page appears. Right-click a form, and then click Preview
o

Form (or click a form, and then click View). The Preview dialog box appears. Check the look and
feel of the form, and then click Finish. The Instance XML dialog box appears. Check the generated
XML, and then click the Close button. The Instance XML dialog box closes. Click the Close button.
D

The Preview dialog box closes.

Device Preview
Use Device Preview to check the look and feel of the form on a device.
To preview a form, in the Enterprise Console, click the Menu button, and then click Forms. The
Forms page appears. Right-click a form, and then click Design Form (or click a form, and then on
the action bar, click Design). The Forms Designer page appears. On the action bar, click Device

Wonderware Training
Section 1 – Workflow Management Forms 4-9

Preview to check the look and feel of the form for a mobile device. The Preview dialog box
appears. Preview the form, and then click the Close button. The Preview dialog box closes.

Forms Designer
Forms Designer is a what you see is what you get (WYSIWYG) web-based design tool, with drag-
and-drop capabilities, used to create web-based forms. Forms designer supports direct drop,
smooth scroll, and device previews.
With Forms Designer, you can:

y
 Drag a control from the toolbox to the canvas to add the control to the form
 Drag a control on the canvas to move or clone a control on the form
 Edit tags inline and manage actions for controls with an on-demand control shortcut menu

op
 Create complex responsive layouts with smart controls, without affecting the schema
 Select columns and adjust column widths
To access Forms Designer, in the Enterprise Console, click the Menu button, and then click Forms.
The Forms page appears. Right-click a form, and then click Design Form (or click a form, and then
on the action bar, click Design). The Forms Designer page appears.

Forms Designer Interface

C
The Forms Designer interface has an action bar, toolbox, and canvas.

Action Bar
The Action Bar has commands to manage the form and controls on the form.
ot
N

Menu/Command Description
Clear All Clear the controls
Import Import the form
Export Export the form
Preview Preview the form
o

Device Preview Preview the form for a mobile device


Publish Publish the form
Properties Edit properties of the form
D

Validate List Validate a form associated with the list


List Structure View the structure of the list

To manage the visibility of the action bar, in the Enterprise Console, click the Menu button, and
then click Forms. The Forms page appears. Right-click a form, and then click Design Form (or
click a form, and then on the action bar, click Design). The Forms Designer page appears.

Workflow Management 2019


4-10 Module 4 – Forms

Do one of the following:


Task Action
Hide the action bar. On the action bar, click the Arrow button. The action bar is hidden in the Forms
Designer except for the Arrow button.
Show the action bar. Click the Arrow button at the top of the Forms Designer. The action bar is shown in
the Forms Designer.

Toolbox
Toolbox has categories to group controls for designing the form. The size of the toolbox can be

y
changed from three columns to one column to increase the size of the canvas.

op
C
ot
N
o
D

Wonderware Training
Section 1 – Workflow Management Forms 4-11

Categories Description
Controls Common controls to design the form.
Containers Container controls to design the form.

To manage the size of the toolbox, in the Enterprise Console, click the Menu button, and then click
Forms. The Forms page appears. Right-click a form, and then click Design Form (or click a form,
and then on the action bar, click Design). The Forms Designer page appears.
Do one of the following:
Task Action

y
Change the size of the toolbox from On the toolbox, click the Arrow button. The size of the toolbox is
three columns to one column. changed from three columns to one column.
Change the size of the toolbox from On the toolbox, click the Arrow button. The size of the toolbox is

op
one column to three columns. changed from one column to three columns.

Canvas
Canvas is the area in the Forms Designer where the form is designed by dragging controls from
the toolbox. Dragging is also supported for repositioning and copying controls.

C
ot
N
o
D

Workflow Management 2019


4-12 Module 4 – Forms

Control Shortcut Menu


The control shortcut menu has commands to manage the control. Hover over a control on the
canvas to access the shortcut menu.

Command Description
Move Move the control to the desired location on the canvas

y
Clone Create a copy of the control, and then move it to the desired location on the canvas
Delete Delete the control
Replace Replace the control

op
Properties Edit properties of the control

Access Control Shortcut Menu


To access the Control shortcut menu, in the Enterprise Console, click the Menu button, and then
click Forms. The Forms page appears. Right-click a form, and then click Design Form (or click a
form, and then on the action bar, click Design). The Forms Designer page appears. Hover over the
control on the canvas. The Shortcut menu appears.

C
ot
N
o
D

Wonderware Training
Section 2 – Form Controls and Containers Overview 4-13

Section 2 – Form Controls and Containers Overview


This section provides an overview of Form controls and containers. It discusses the three types of
Form controls: Controls, Containers, and Custom controls. It describes values for controls and
containers within a form and also explains how to add controls and containers to the canvas. It
describes the menu options of controls and containers. In addition, it introduces the properties
pane for controls and containers and describes the common properties.

Form Controls

y
Controls are the basic components of a form to view, enter, or submit data. There are three types
of controls:

op
 Containers
 Controls
 Custom Controls
Controls are grouped as either basic controls and container controls. Container controls are used
to place basic and container controls to create a complex form section or layout. Custom controls
are created by developers to meet application-specific requirements.

Containers
Containers are grouped as follows:


C
Form: Use as a basic container to place other containers and controls.
Base Form: Use to manage controls placed on the record (child controls) in your form.
ot
You can place any number of controls on a record, and add and delete records for the
control. At runtime, you can click Add Record to repeat a record and Delete Record to
remove a record. You can view the values of the child controls in the Summary of the Base
Form only when the Repeating property for the child controls is set to True, and the form is
viewed on a small form factor mobile device.
 Panel Form: Use to group controls placed on the control (child controls) in your form.
N

 Tabs: Use to group controls placed on the tab in your form.


You can place any number of controls on a tab, and add and delete tabs for the control. By
default, a Tab control is added to the control.

Controls
o

Controls are the standard controls that are provided and include: Attachment, Boolean, Button,
Chart, Check Box, Data Grid, Data Lookup, Date, Date Time, Drop-Down, Email, E-signature,
Signature, Hidden Field, Hyperlink, Image, Invoke Workflow, List, Number, Password, Pop-Up,
Radio Button, Text, Time, Tree, and User Lookup.
D

Custom Controls
Custom controls are controls designed with specific or custom properties. Custom controls make
use of the advanced forms features and support jQuery and Knockout based JavaScript controls.
Custom controls can be added either to a custom category or to the Controls category in the
Forms Designer toolbox.

Workflow Management 2019


4-14 Module 4 – Forms

A custom control is created and integrated with the forms as follows:


 Create a dynamic-link library (DLL) or an assembly where all the prerequisites for creating
and registering a custom forms control is followed.
 Add the assembly to the global assembly cache (GAC) or place the assembly in a
dedicated folder.
 If the assembly is placed in a dedicated folder, register the location of the folder with the
SOA Folder List.
 Register the assembly as a forms custom control through the Forms Controls.
 Use the new custom control in your forms from the toolbox in the Forms Designer.

y
XML Variables and Nodes

op
The following sections describe controls and containers within a form using XML variables and
XML Nodes.

Understanding XML Node Mapping


This section explains the importance of XML Nodes while designing a List or a Form. The XML
node allows binding a SQL Database to a List and the List to be mapped to a Form.


C
The following are the XML Nodes with an example of a library database.
Database contains the table with columns such as, Id, Title, Author, Application.
In the List, the Author control is bound to the DB column Author.
In the Form, the Author Name control is mapped to the Author control in the list with the
XML Node named Authorname.
ot
A table column is mapped to a List control using the List control property Bound to DB Column and
the List control is mapped to Form control using Mapped XML Node.
When you input data using a Form and the data is stored in the corresponding List, the List then
updates the database table.

Note: When you design a List or Form, the Mapped XML Node allows mapping of a List to a
N

Form. When you add a control for the first time, the XML Node is dynamically altered to reflect the
Tag Name. Editing the Mapped XML Node at a later instance will affect the mapping between
Forms, Lists, and Workflows.
o
D

Wonderware Training
Section 2 – Form Controls and Containers Overview 4-15

XML Variable User Interface


The XML Variable User Interface is for configuring XML variables. This window is opened when
you click the XMLVariables property of the Start activity. All XML variables added for the workflow
are displayed in rows in the grid. The variable properties that are specific to an XMLVariable are
displayed in the Variable Properties section for an XML variable.

y
op
C
ot
Common Properties Available for All XML Variables
N

The following properties are common for all XML variables:


XML Variable Property Description
Variable Name Used to specify the name of the variable.
Type Specifies the type of the XML variable. The available XML variable types are
document, XML SAPTable, Microsoft SharePoint List/DocLibrary, XML
ListIterator, Microsoft SharePoint InfoPath Form, XML List, and XML Iterator.
o

Description Specifies the description of the XML variable.


Scope
Global If the XML variable is of Global scope, you have to set the value of this field as
D

Global for the variable, where that variable can be used anywhere in that
workflow instance.
Local If the XML variable is of Local scope, the value of the variable is local to a
workflow instance.

Workflow Management 2019


4-16 Module 4 – Forms

XML Variable for List


An XML List type XML variable can be mapped to any list schema, that is, either to lists provided
out of the box or to lists created dynamically using create list option, to perform retrieval of data of
a list item.
Using XML list XMLVariable, you can fetch the data from any list. XML Variable for XML List can be
mapped to any XML List schema for inserting, updating, and retrieving list items. You can also
attach the list to a workflow in a few steps.

XML Variable of Type XML List

y
When the variable type is changed to XML List, the following extra properties and ListItem Scope
Options are displayed as seen in the image below.

op
C
ot
N

See Creating an XML List type XML Variable for more information at http://sun.skelta.com.
.
o
D

Wonderware Training
Section 2 – Form Controls and Containers Overview 4-17

Mapping XML Nodes


XML node binds a database to a list, and maps a list to a form, and a form to a workflow. This
ensures the data submitted from the form is available in the list and the database.
The default value for the Mapped XML Node property is the value for the Tag name property
without the spaces. If you edit this value later, then it might affect the mapping between lists,
forms, and workflows.

Mapping Between a Database, List, and Form

y
When creating a list, you bind a control in the list to a field in the table of a database by setting the
value of the field as the value of the Bound to DB Column property for the control in the list.
Similarly, when creating a form, you should map a control in the form to a control in a list by setting
the value of the Mapped XML Node property for the control in the list as the value of the XML Node

op
property for the control in the form. When a dynamic list form is generated, the system takes care
of this mapping.
Shown below is an example of the mapping between a database, list, and form using the database
field and the XML Node.

C
ot
Mapping Description
Field of the table to The Author Full Name control in the Book Author list is bound to the Author field in
control of the list the WWSK-DS-dbo.Authors table of the repository database by setting Author (which
is the value of the field) as the value of the Bound to DB Column property for the
N

Author Full Name control in the Book Author list.


Control of the list to The Name control in the Writer form is mapped to the Author Full Name control in the
control of the form Book Author list by setting AuthorName (which is the value of the Mapped XML
Node) as the value of the XML Node property for the Name control in the Writer form.

Adding Controls
o

To add a control, in the Enterprise Console, click the Menu button, and then click Forms. The
Forms page appears. Right-click a form, and then click Design Form (or click a form, and then click
D

Design). The Forms Designer page appears.


Drag a control from the toolbox to the desired location on the canvas. The selected control
appears on the canvas.

Workflow Management 2019


4-18 Module 4 – Forms

Menu Options
Selected menu options will be discussed below.

Moving Controls
You move a control to reposition the control to the desired location on the canvas.
To move a control, in the Enterprise Console, click the Menu button, and then click Forms. The
Forms page appears. Right-click a form, and then click Design Form (or click a form, and then click
Design). The Forms Designer page appears. Hover over the control on the canvas. The Shortcut

y
menu appears. Click the Move button, and then drag the control to the desired location on the
canvas.

op
Cloning Controls
You clone a control to create a similar control on the canvas.
To clone a control, in the Enterprise Console, click the Menu button, and then click Forms. The
Forms page appears. Right-click a form, and then click Design Form (or click a form, and then click
Design). The Forms Designer page appears. Hover over the control on the canvas. The Shortcut
menu appears. Click the Clone button, and then drag the control to the desired location on the
canvas.

C
Note: You can clone all controls including container controls. When you clone a container control,
the container, including the controls in the container, is copied. When you clone a control, the copy
of the control is the same as the original control, except for the ID, which is generated
automatically.
ot
Deleting Controls
You delete a control when the control is no longer required.
To delete a control, in the Enterprise Console, click the Menu button, and then click Forms. The
Forms page appears. Right-click a form, and then click Design Form (or click a form, and then click
Design). The Forms Designer page appears. Hover over the control on the canvas. The Shortcut
N

menu appears. Click the Delete button. A confirmation message appears. Click OK. The control is
deleted from the canvas and the confirmation message is closed.

Note: If you delete a control, the control cannot be restored.


o

Replacing Controls
You replace a control to change it to a different control at the same position on the canvas.
To replace a control, in the Enterprise Console, click the Menu button, and then click Forms. The
D

Forms page appears. Right-click a form, and then click Design Form (or click a form, and then click
Design). The Forms Designer page appears. Hover over the control on the canvas. The Shortcut
menu appears. Click the Replace button. The Replacement Control Configuration page appears.
In the Replacement Control list, click a control.

Wonderware Training
Section 2 – Form Controls and Containers Overview 4-19

Do one of the following:


Task Action :
Copy values of similar properties from the Under Copy Similar Properties, click Yes.
existing control to the replaced control.
Delete the existing control and add a new control. Under Copy Similar Properties, click No.

Click Apply. The control is replaced and the Replacement Control Configuration page is closed.

Note: If you replace a control, the control cannot be restored. Replacing a control with the Pop-

y
Up, Embed Form, or Tab control or vice-versa is not supported.

Editing Properties of Controls

op
You edit the properties of a control to change the appearance and functionality of the control.
To edit the properties of a control, in the Enterprise Console, click the Menu button, and then click
Forms. The Forms page appears. Right-click a form, and then click Design Form (or click a form,
and then on the action bar, click Design). The Forms Designer page appears. Hover over the
control on the canvas. The Shortcut menu appears. Click the Properties button. The Properties
dialog box appears. Edit the properties of the control, and then click Apply. The properties are

C
saved and the Properties dialog box is closed.

Control Properties
The properties for a control are grouped by the following tabs, depending on the control:
 Basic
ot
 Appearance
 Validation
 Advanced
 Scripts
N

Properties Pane
This section introduces the Properties pane for controls and containers. The properties are
grouped by tabs. Only the common properties are discussed below.
o
D

Workflow Management 2019


4-20 Module 4 – Forms

Basic
Property Description
Name Name that identifies the control. This value is also used for the label of the
control.
XML Node XML node mapped to the control. Use this value to map a list to a form and a
form to a workflow.
 Prefix with @ to use the value of the control as an attribute with the
immediate parent node. For example, @FirstName.
 Use / for a parent-child node configuration to uniquely identify a control in a

y
form with multiple containers. For example, Employee/FirstName.
The default value is the value for the Name property without the spaces.
Note: If you use / to denote a parent that is not a container and the parent

op
is at the same level as that of the child, the XML node for the control is not
generated. If you edit this value later, it might affect the mapping between
forms, lists, and workflows.
Description Description for the control.
Tooltip Message that appears when the pointer hovers over the control.
Default Value The default value for the control.
To add the default value for the control, click the User Lookup button. The

C
Default Value dialog box appears. In the Provider box, click a provider. In the
Search For field, enter a search keyword. In the In list, click a search criteria.
Click Search. The search results appear. Click a user in the search results, and
then click Save. The selected user is set as the default value, and the Default
Value dialog box is closed.
To delete the default value for the control, click the Clear button. The selected
user is deleted.
ot
Appearance
Property Description
Enable Enable or disable the control.
N

 Select Yes to enable the control.


 Select No to disable the control.

The default value is Yes.


Visible Show or hide the control.
 Select Yes to show the control.
 Select No to hide the control.
o

The default value is Yes.


D

Wonderware Training
Section 2 – Form Controls and Containers Overview 4-21

Property Description
Label Position Position of the label for the control.
 Select Default to allow the system to align the label. The system aligns the label
to the left of the control or as specified by the container control.
 Select Left to align the label to the left of the control.
 Select Top to align the label to the top of the control.
 Select Right to align the label to the right of the control.
 Select Bottom to align the label to the bottom of the control.
 Select Suppress to hide the label for the control.

y
The default value is Default.
Note: If the value is Default and the control is placed on a container control, the
value of the Label Position property of the container control determines the position

op
of the label for the control. For example, if the value is Default and the control is
placed on a Base Form with Label Position property set to Top, the label is aligned
to the top of the control.
Label-Control Area Area occupied by the label and the control in percentage.
 Select Default to allow the system to set the label and the control areas.
 Select Custom to specify the label area. The control area is automatically set
based on the label area.
The default value is Default.

Width
C
Note: If the value is Default and the control is placed on a container control, the
value of the Label-Control Area property of the container control determines the
area of the label for the control. This is applicable only when the Label Position is
set to Left or Right.
Width in pixels for the control.
ot
The default value is 0.
Note: If the value is 0, then the width of the control is set as per the default values.
Height Height in pixels for the control.
The default value is 0.
Note: If the value is 0, then the height of the control is set as per the default values.
N

Retain Space Reserve or remove space when the control is hidden.


 Select Yes to keep space when the control is hidden.
 Select No to remove space when the control is hidden.

The default value is No.

Validation
o

Property Description
Mandatory Enforce or bypass entering a value for the control.
 Select Yes to enforce entering a value for the
D

control.
 Select No to bypass entering a value for the
control.
The default value is No.

Workflow Management 2019


4-22 Module 4 – Forms

Advanced
Property Description
On Data Change Run a script when value of the control changes.
ID Reference identification code for the control. This value is automatically
generated and cannot be changed.
Extended Information Allow or deny a user to access the extended information (that is, columns other
than the display and value columns of the result set) based on the selection for
the control.
 Select Yes to allow a user to access the extended information based on

y
the selection for the control.
 Select No to deny a user access to the extended information based on the
selection for the control.

op
The default value is No.
Include in Summary Allow or deny a user to view the value in the Summary of a Base Form.
 Select Yes to allow a user to view the value in the Summary of a Base
Form.
 Select No to deny a user to view the value in the Summary of a Base
Form.
The default value is No.

Scripts
C
Note: This property is applicable only when the control is used on a Base Form
with Repeating property set to True, and the form is viewed on a small form
factor mobile device.

Scripts are a list of instructions to accomplish a desired operation. You can use various methods in
ot
the Forms APIs in your scripts to customize your business applications. Forms use JavaScript to
deliver rich and dynamic web content.
Use scripts to create business rules and complex scenarios in your forms.
JavaScript
JavaScript is a dynamic, object-oriented, and interpreted client-side scripting language for web
N

pages. JavaScript is used to validate data on a form before submitting the form. JavaScript is also
used to make content interactive or load new content on a page and submit data to a server
without reloading the page.
Script Editor
Script Editor is a custom editor to code in JavaScript.
o

Script Editor Interface


The Action bar is a part of this interface and has commands to edit the script and preview the form.
D

Wonderware Training
Section 3 – Controls and Containers 4-23

Section 3 – Controls and Containers


This section describes the text-entry, Date Time, traditional data entry, and miscellaneous
controls and their properties. It also discusses containers.

Controls
There are several types of controls, some of which are described in the following lists.
Text-Entry Controls

y
 Email: Enter email addresses in your form.
 Number: Enter and view numerical data in your form.
 Text: Enter and view textual data in your form.

op
 Password: Enter a password in your form.
 Hidden Field: Submit custom data in your form.
 Date Time: Select a date and time in your form.
 Time: Select a time in your form.
 Date: Select a date in your form.
 Date and Time: Convert date and time value to a human readable string using culture-


specific settings.
Traditional Data Entry Controls

C
Check Box: Turn an option on and off by selecting or clearing the check box in your form.
Radio Button: Select one of a group of mutually exclusive options in your form.
Boolean: Select either Yes or No in your form.
ot
 List: Select one or many options from a list in your form.
 Drop-Down: Select an option from a list in your form.
Miscellaneous Controls
 Image: Insert an image in your form.
 Attachment: Attach a file in your form.
N

 Hyperlink: Create a link to a URL in your form.


 Button: Perform an action in your form. You can display both text and image on the
control.
 E-signature: Authenticate the identity of a user who signed the document and confirm the
integrity of the signed document in your form.
Gauge: Display data in a gauge in your form.
o

 Data Lookup: Search for data from a data source in your form.
 Invoke Workflow: Invoke a workflow from your form.
Embed Page: Show a web page in your form.
D

 Embed Form: Use the entire form as a part of another form. You can design the common
section in a form and use it in other forms using Embed Form.
 Pop-Up: Open a form as a pop-up window in your form. You can reuse your existing form
using this control.
 Hierarchical List: View a hierarchical list in your form.
 Chart: View a chart in your form.

Workflow Management 2019


4-24 Module 4 – Forms

Explain the Containers:


 Tabs: Group controls placed on the tab in your form.
 Panel Form: Group controls placed on the control (child controls) in your form.
 Base Form: Manage controls placed on the record (child controls) in your form.

y
op
C
ot
N
o
D

Wonderware Training
Lab 11 – Working with Basic Form Controls 4-25

Lab 11 – Working with Basic Form Controls

Introduction
In this lab, you will create an EPI process submittal form. This form will be used by the operator to
report the reason for a spill incident and the actions taken to clean the spill. The form will also
gather information about the number of the spilled drum and the speed of the conveyor belt at the
time of the spill. You will create a new form and modify some of the properties to change the
behavior. You will see how the form designer works and will work with some design time tab

y
properties and most commonly used form control properties. You will configure the Mandatory,
Minimum Value, and Maximum Value validations to showcase inbuild validation capabilities of form
controls.

op
Objectives
Upon completion of this lab, you will be able to:
 Create a new form
 Set up common design time tab properties for a form
Set up common properties for Form controls

C
Check the Mandatory, Minimum Value, and Maximum Value validations
ot
N
o
D

Workflow Management 2019


4-26 Module 4 – Forms

Create and Configure a Form


First, you will create an Environment Pollution Incident (EPI) form. You will add and configure
various form controls.
1. Ensure you are logged into Enterprise Console as the admin user, and then in the
hamburger menu, click Forms.

y
op
The Forms page appears.

C
ot
2. Click New , and then on the toolbar that appears, click Form .
The New Form window appears.
N

3. In the Name field, enter Lab11.


4. In the Description field, enter Working with Basic Form Controls.
o
D

Wonderware Training
Lab 11 – Working with Basic Form Controls 4-27

5. Click Save & Continue.


The Form Options window appears.

y
op
C
6. Leave the default settings and click Finish.
The Forms Designer page appears with the Lab11 name and description displayed and the
controls in the left pane. Notice the commands in the toolbar at the top-right of the page.
ot
N
o
D

Workflow Management 2019


4-28 Module 4 – Forms

7. In the Controls pane on the left, click the Text control and drag it to the right pane.
It automatically places itself.

y
8. Drag the Number , and then the Email controls to the right pane.

op
9. Hover over a control you just placed.
C
A toolbar with various options appears. You may have to click somewhere on the form first to
establish the focus.
ot
N

10. Hover over each option in the toolbar to see what it does.

11. In the main toolbar at the top of the window, click the Clear All button to remove all the
o

controls.
When you clear all, a message appears confirming that you want to delete all the controls.
D

12. Click OK.

Wonderware Training
Lab 11 – Working with Basic Form Controls 4-29

You can also delete controls individually by hovering over the control and using the Delete
button on the toolbar.
13. Drag one Text control to the right pane, followed by Number, Date Time, Drop-Down, and
two more Text controls.
The controls will be automatically placed below the previous control.

y
op
C
Now, you will format the controls. You will first change the name, which you can do by editing in the
line or using the properties. You will use the properties.

14. Hover over the first text control and click the Properties

Widen your window if necessary to see the Properties


button.

button.
ot
The Properties window appears on the right side of the screen.
N
o
D

Workflow Management 2019


4-30 Module 4 – Forms

15. In the Name field, enter Drum Number.


16. In the XML Node field, leave the default name.
The XML Node field is populated automatically with the name, but without spaces. A form
control can be identified programmatically by its ID, Name, or XML Node. However, XML Node
is the preferred choice of programmers because of its readability.
17. In the Description field, enter Number of Spilled Drum.
18. In the Tooltip field, enter Number of Spilled Drum.
This is an optional field.

y
op
C
ot
19. Click Apply.
The form appears with the first text field configured.
N
o
D

Wonderware Training
Lab 11 – Working with Basic Form Controls 4-31

20. Configure the Number control as follows:

Name: Speed
XML Node: Speed
Description: Speed of the conveyor at the time of the spill

y
op
Name:
XML Node:
Description:
Incident Date and Time
IncidentDateandTime
C
21. Configure the Date Time control as follows:

Date and time of the spill


ot
N
o
D

Workflow Management 2019


4-32 Module 4 – Forms

22. Configure the top portion of the Drop-Down control as follows:

Name: Incident Reason


XML Node: IncidentReason
Description: Reason for the spill incident being reported

y
op
button.
24. In the Text field, enter Unknown.
25. In the Value field, enter 0.
C
23. To add the Date Time control drop-down options, under Options, click the Add Record
ot
26. For Fore Color, click the drop-down arrow, and then click the top-left corner to select white.
27. In the color window, click Apply.
N
o
D

Wonderware Training
Lab 11 – Working with Basic Form Controls 4-33

28. For Back Color, click the drop-down arrow, and then click the top-right corner to select red.

y
op
29. In the color window, click Apply.

30. Click the Add Record button and add the Conveyor Fault and Human Error options as
follows:

Text: Conveyor Fault


Value: 1

Text:
Value:
Human Error
2
C
ot
N

31. Click Apply to apply the Drop-Down settings.


o
D

Workflow Management 2019


4-34 Module 4 – Forms

The form reappears.

y
op
Now, you will configure the last two text controls. You can use line editing to change the control
name instead of changing it in the Properties window.
32. For the first remaining Text control, double-click Textinput2 and change it to Action Taken.

C
33. Open the Properties window, and note that the Name and XML Node have been updated.
ot
N

34. In the Description field, enter Action taken by the operator.


o
D

Wonderware Training
Lab 11 – Working with Basic Form Controls 4-35

35. Click the Appearance tab.


36. At the bottom of the tab, in the Display Mode drop-down list, select Multi Line.
37. Change Rows to 5.

y
op
C
ot
38. Click Apply to apply the first Text settings.
The form appears with the configured controls.
N
o
D

Workflow Management 2019


4-36 Module 4 – Forms

39. Repeat Steps 32 to 34 to configure the second Text control as follows:

Name: Comments
XML Node: Comments
Description: Comments entered by the approver

y
op
C
ot
N
o
D

Wonderware Training
Lab 11 – Working with Basic Form Controls 4-37

Preview the Form


Now, you will preview the form and also preview it on a mobile device and tablet.

40. To view the finished form, on the toolbar at the top of the page, click Preview .
The finished form appears.

y
op
C
ot
N

41. Review the form to see all the information you configured and check the Speed field and the
Incident Reason drop-down list to see the details you added.
o
D

42. Close the preview.

Workflow Management 2019


4-38 Module 4 – Forms

43. To see how the form would appear on a mobile device, on the toolbar at the top of the page,

click Device Preview .


An image of how the form would look on a mobile device appears.

y
op
view.
C
44. To see how the form would appear on a tablet, click

An image of how the form would look on a tablet appears.


at the top-right of the mobile device
ot
N

45. Close the tablet preview.


o
D

Wonderware Training
Lab 11 – Working with Basic Form Controls 4-39

Configure Mandatory, Minimum, and Maximum Values


Now, you will perform additional configuration to require information.
46. To further configure Drum Number, open its properties.
47. On the Validation tab, for Mandatory, click the Yes option.
48. In the Minimum Length field, enter 1.
Ignore the message that maximum length cannot be less than minimum length. It will go away
when you configure the next field.

y
49. In the Maximum Length field, enter 5.

op
C
ot
N

50. Click Apply.


o
D

Workflow Management 2019


4-40 Module 4 – Forms

51. To further configure Speed, open its properties.


52. On the Validation tab, change the Minimum Value to 1.
If another error message appears, ignore the message.
The 1 will change to 1.00 when you click in the next field.
53. Change the Maximum Value to 1500.
The 1500 will change to 1500.00 when you click elsewhere.

y
op
C
ot
N

54. Click Apply.


o
D

Wonderware Training
Lab 11 – Working with Basic Form Controls 4-41

55. To further configure Incident Date and Time, open its properties.
56. On the Basic tab, in the Default Value field, click the calendar and choose January 1, 2019,
which will be the earliest date that is used.

y
op
C
57. On the Advanced tab, in the Date Format field, enter dd-MMMM-yyyy.
ot
N
o
D

58. Click Apply.

Workflow Management 2019


4-42 Module 4 – Forms

59. Preview the form again.

y
op
C
ot
60. Click Finish to submit the form.
An error message appears because some required information is missing.
N

61. Click Close.


o

A message appears at the top-right of the preview below the Drum Number field that the
drum number is mandatory.
D

Wonderware Training
Lab 11 – Working with Basic Form Controls 4-43

Now, you will provide the required information.


62. In the Drum Number field, enter D105.
63. Although the Speed field is not mandatory, enter 300.
64. In the Incident Date and Time field, select January 9, 2019.

y
op
C
ot
65. Click Finish.
The Instance XML window appears.
N
o

66. Close the window and close the preview.


Your form is now ready for use.
D

67. Close the form.

Workflow Management 2019


4-44 Module 4 – Forms

y
op
C
ot
N
o
D

Wonderware Training
Section 4 – Forms Design Layout and Scripting 4-45

Section 4 – Forms Design Layout and Scripting


This section describes how to design a form layout using the Container controls Base and Panel
Form. It explains how to use the nested Panel control to organize the form layout and discusses
scripting in the Form controls.

Containers
Containers are used to place basic and container controls to create a complex form section or

y
layout. Containers are grouped as follows:
 Form: Use as a basic container to place other containers and controls.
 Base Form: Use to manage controls placed on the record (child controls) in your form.

op
You can place any number of controls on a record, and add and delete records for the
control.
 Panel Form: Use to group controls placed on the control (child controls) in your form.

Designing Form Layouts


To design a form layout to organize controls on a form using container controls, in the Enterprise

C
Console, click the Menu button, and then click Forms. The Forms page appears. Right-click a
form, and then click Design Form (or click a form, and then click Design). The Forms Designer
page appears. Drag a Panel Form container from the toolbox to the desired location on the
canvas. The selected control appears on the canvas. Hover over the Panel Form container, and
then click the Properties button. The Properties dialog box appears. In the Name box, delete the
name. Click the Appearance tab, and then in the Columns box, type the number of columns
ot
required. Click Apply. The properties are saved and the Properties dialog box is closed.
Drag the required controls or containers from the toolbox to the desired column on the Panel Form
container to nest the controls. Set the required properties for the new controls or containers.
Preview the form to check look and feel of the form with the layout at runtime. Click the Close
button. The form is saved and the Forms Designer page is closed.
N

Note: When placing controls and containers in Base Form and Panel Form, ensure the placed
controls and containers are visible and accessible to the user. Controls in the other columns of the
Panel Form cannot be aligned when there are no controls in the first column of the Panel Form.

Scripting in a Form
o

You use the Scripts tab to add a script to a form. You click the Expression Editor button to open the
Script Editor, where you can either create or import a script.
D

Workflow Management 2019


4-46 Module 4 – Forms

y
op
C
ot
N
o
D

Wonderware Training
Lab 12 – Scripting in Form Controls 4-47

Lab 12 – Scripting in Form Controls

Introduction
In this lab, you will build on the form you created in the last lab, using scripting. You will create an
approval form for the EPI process. The operator will submit this form to the supervisor. The
supervisor will be able to enter comments and either approve or reject the operator’s report. To
create this form, you will import the Lab11 form and add numeric values and strings. You will use
the Base Form control to display multiple controls in a row and add scripting under the Base Form

y
control to calculate the total of ordered items.

Objectives

op
Upon completion of this lab, you will be able to:
 Use the Panel control to modify a form layout
 Use scripting in the Form controls
 Use scripting in the Base Form control

C
ot
N
o
D

Workflow Management 2019


4-48 Module 4 – Forms

Export and Import a Form


First, you will export the Lab11 form, and then import it into the new approval form.
1. Ensure you are logged into Enterprise Console as the admin user.
The Forms page should still be open with Lab11 listed.
2. If the Forms page is not open, use the hamburger menu to open it.
3. Right-click Lab11 and select Export Form.

y
op
C
ot
A message appears allowing you to confirm the export.
N

4. Click OK.
The file is saved in your Downloads folder by default.
5. Navigate to your Downloads folder and copy the file.
o

6. Navigate to the C:\Training folder and paste the file.

7. In the Enterprise Console, on the Forms page, click New , and then on the toolbar that
D

appears, click Form .

Wonderware Training
Lab 12 – Scripting in Form Controls 4-49

The New Form window appears.


8. In the Name field, enter Lab12.
9. In the Description field, enter Scripting in Form Controls.

y
op
10. Click Save & Continue.
C
ot
The Form Options window appears.
N
o
D

11. Leave the default settings and click Finish.

Workflow Management 2019


4-50 Module 4 – Forms

The Forms Designer page appears with the Lab12 name and description displayed and the
controls in the left pane.

y
op
12. On the toolbar, click the Import button.
The Import window appears on the right side of the screen.

C
ot
13. Click the Choose File button and navigate to the C:\Training folder and select the
Lab11_1.xml file.
N

14. Click Open.


o
D

Wonderware Training
Lab 12 – Scripting in Form Controls 4-51

The file is added to the Select Form XML path in the Import window.
15. Click Import.
A message appears confirming that the file was imported successfully.

y
op
16. Click Close.
C
ot
The Forms Designer page reappears with the Lab11 form imported.
N
o
D

Workflow Management 2019


4-52 Module 4 – Forms

17. On the toolbar, click Properties .

If the Properties button is not visible, click the More button, and then click Properties.

y
The Properties window appears.

op
18. In the Name field, enter EPI Approval Form.
The XML Node does not update because it is tied to the original Lab11 name. You cannot
update the Description here because it is also tied to the original Lab11 description. You will
edit the form later to be able to update the description.

C
ot
N
o

19. Click Apply.


20. Close Lab12.
D

You need to close the form before you can edit it and update the Description field discussed
previously.
21. Close any dialog boxes related to exporting the file that appears.

Wonderware Training
Lab 12 – Scripting in Form Controls 4-53

22. On the Forms page, select Lab12, and then on the toolbar, click Edit .
The Edit Form window appears.
In the Description field, note Scripting in Form Controls. That is the description you used in
Step 9 when you created the form, but when you imported Lab11, it kept the Lab11 description
and did not update. It will update now that you have opened it in Edit mode.

y
op
C
ot
23. Click Save & Continue.
The Edit Form window closes and the form appears.
N
o
D

Workflow Management 2019


4-54 Module 4 – Forms

24. At the top-left of the form, ensure that the description below the updated title has also been
updated.

y
op
C
25. Preview the form and confirm that it shows the updated title and description.
ot
N
o
D

Wonderware Training
Lab 12 – Scripting in Form Controls 4-55

26. Close the preview.


27. In the Controls pane on the left, scroll down to the Containers area.

y
op
28. Drag the Panel Form control to the right pane.
A dotted line appears along the bottom of the window, indicating where the control will be
placed.

C
When you release the mouse, the control is placed at the bottom of the form below
Comments.
ot
N

29. Hover over the Panel Form control, and then open the Properties for that control and
configure the control as follows:

Name: Approver Area


XML Node: ApproverArea
o
D

Workflow Management 2019


4-56 Module 4 – Forms

30. Configure the Appearance tab for Approver Area as follows:

Visible: Yes (default)

y
op
31. Click Apply.
C
32. Drag another Panel Form control inside the Approver Area control.
ot
You can place a panel within another panel to create a child panel.
N
o
D

Wonderware Training
Lab 12 – Scripting in Form Controls 4-57

33. Repeat Steps 29 to 31 to configure the second Panel Form control as follows:

Name:
XML Node: ApproverDetails
Visible: Yes (default)

y
op
C
ot
34. In the Controls pane, scroll up and drag three Text controls into the child Panel Form control.
Place each when the dotted line is at the bottom of each Text control.
N

35. Open the Properties for the first Text control and configure the control as follows:
o

Name: Approver Name


XML Node: ApproverName
D

Workflow Management 2019


4-58 Module 4 – Forms

36. Configure the Appearance tab for Approver Name as follows:

Read-Only: Yes

y
op
37. Click Apply.

Name:
XML Node:
Email
Email
C
38. Repeat Steps 35 to 37 to configure the second Text control as follows:
ot
Read-Only: Yes

39. Repeat Steps 35 to 37 to configure the third Text control as follows:

Name: Department
XML Node: Department
N

Read-Only: Yes

The configured controls appear in the form as shown below:


o
D

Wonderware Training
Lab 12 – Scripting in Form Controls 4-59

40. In the left pane with the controls, scroll down to the Containers area.

41. Drag the Base Form control to the bottom of the Approver Area, below the child panel.
Note the dotted line where it will be placed inside the Approver Area. After you release the
mouse button, the control is placed at the bottom of Approver Area, below the child panel.

y
op
If the control is placed inside the child panel, use the Move button on the toolbar to
reposition it.
42. Open the Properties for the Base Form control and configure the control as follows:

Name:
XML Node:
Repair List
RepairList
C
ot
N

You can drag one control at a time to any one row. If you want more than one control in a row, you
can use panels and change the properties of the panel to allow multiple controls, including
changing the number of columns. However, using the Base Form control is easier. You can add
multiple controls inside a Base Form control using drag-and-drop.
o

Next, you will add several controls to the Base Form control Repair List.
43. Drag a Text control into Repair List.
The Text control is added in Repair List.
D

Workflow Management 2019


4-60 Module 4 – Forms

44. Drag a Drop-Down control into Repair List on the right side.
As you are dragging, note the dotted line, which indicates that the control you are dragging will
be added in that location. All added controls are automatically added to the right of the last
control in a Base Form control.

y
45. Open the Properties for the Text control and configure the control as follows:

op
Name: Product Type
XML Node: ProductType

46. Click Apply.

C
47. Open the Properties for the Drop-Down control and configure the control as follows:

Name: Size
ot
XML Node: Size
Options Caption: Select Size
N
o
D

Wonderware Training
Lab 12 – Scripting in Form Controls 4-61

48. Under Options, click the Add Record button to add the Base Form control drop-down
options.
49. In the Text field, enter Small.
50. In the Value field, enter SM.

51. Click the Add Record button to add the two other size options as follows:

Text: Medium
Value: ME

y
Text: Large
Value: LA

op
52. Click Apply. C
Notice the Size drop-down arrow for the options you added.
ot
N

53. Drag a Text control into Repair List on the right side and use the Properties for that control to
configure the control as follows:

Name: Product Code


XML Node: ProductCode
o

54. Click Apply.


D

Workflow Management 2019


4-62 Module 4 – Forms

The design area is getting crowded as you add more controls. You can collapse the Controls
pane before you continue adding more controls.

55. To the left of the form, click to collapse the Controls pane and increase the design area.

y
op
C
ot
56. Drag four Number controls into Repair List on the right side.
N

57. For the first three Number controls, use the Properties for each control to configure the
control as follows, and click Apply after each configuration:

Name: In Stock
o

XML Node: InStock

Name: Ordered Qty


D

XML Node: OrderedQty

Name: Unit Price


XML Node: UnitPrice

Wonderware Training
Lab 12 – Scripting in Form Controls 4-63

58. For the fourth Number control, use the Properties for the control to configure the control as
follows:

Name: Total
XML Node: Total

59. Configure the Appearance tab as follows:

Enable: No

y
op
C
ot
60. Click Apply.
N
o
D

Workflow Management 2019


4-64 Module 4 – Forms

The Base Form control not only allows you to add controls side-by-side in a form, it also allows
you to add multiple records during runtime.
61. Preview the form.
62. Check that it was configured correctly.

y
op
C
ot
N
o
D

Wonderware Training
Lab 12 – Scripting in Form Controls 4-65

63. Scroll down to Repair List and click Add Record a few times to add records to the form.
64. Click the first Size drop-down list to see the Small, Medium, and Large options.

y
op
65. Close the preview.

Properties .
C
Now, you are going to use scripting to display the logged in user’s name and details automatically.

66. In the Forms Designer toolbar, click More , and then on the toolbar that appears, click
ot
The Properties window appears.
N
o
D

Workflow Management 2019


4-66 Module 4 – Forms

67. Click the Scripts tab.

68. To the right of the On Form Load field, click the Expression Editor button.

y
The Script Editor window appears.

op
C
ot
69. In File Explorer, navigate to C:\Training\Scripts.
70. Open LAB-12 Example Script and copy Script 1.
N

var UID= SFU.getVirtualActorId();


var UserInfo=SFU.getUserLookupExtendedInformation(UID);
control.findByXmlNode("ApproverName").value=UserInfo.UserDisplayName;
control.findByXmlNode("Email").value=UserInfo.Email;
control.findByXmlNode("Department").value=UserInfo.UserDepartment;
o
D

Wonderware Training
Lab 12 – Scripting in Form Controls 4-67

71. In the Script Editor, in the right pane, paste the text.

Note: The script has been provided, but you can expand the ApproverArea in the left pane
as shown below to see information used to create the script. Additional information was used
for the final script, but to add ApproverName, Email, and Department controls, expand
Approver Area, and then expand Approver Details and click ApproverName, Email, and
Department.

y
op
C
ot
72. Click Save & Close.
A message that the script contains warnings may appear.
N

73. Click Cancel and check the script.


o

If it gives a message that the line in the script was not what it was expecting, it is OK to ignore
it.
D

74. Click Save & Close.


The message reappears.

Workflow Management 2019


4-68 Module 4 – Forms

75. Click OK.


The Properties window reappears with the first line of the script displayed in the On Form
Load field.

y
op
76. Click Apply.
77. Preview the form.
C
ot
The Approver Area displays the approver’s name, email, and department.
N
o
D

78. Close the preview.

Wonderware Training
Lab 12 – Scripting in Form Controls 4-69

Next, you will configure fields for concatenation using scripting.


79. In the Repair List section, open the Properties for the Product Code.
Product Code will be a concatenation of Product Type and Size.

80. On the Scripts tab, to the right of the Value field, click the Expression Editor button.

y
op
The Script Editor window appears. C
ot
N
o
D

Workflow Management 2019


4-70 Module 4 – Forms

81. In LAB-12 Example Script, copy Script 2.

var
ProdCode=control.findByXmlNode("ProductType").value+control.findByXmlNode("S
ize").value;
return ProdCode;

y
op
82. In the Script Editor, paste the text.

Note: The script has been provided, but you can expand the ApproverArea in the left pane

C
as shown below to see information used to create the script. Additional information was used
for the final script, but to add ProductType and Size controls, expand Approver Area, and
then expand RepairList and click ProductType and Size.
ot
N
o
D

83. Click Save & Close.


.

Wonderware Training
Lab 12 – Scripting in Form Controls 4-71

The Properties window reappears with the first line of the script displayed in the Value field.

y
op
84. Click Apply.
C
Now, you will configure fields for calculation using scripting. In Stock and Ordered Qty will be
ot
added, and then multiplied by Unit Price to get the Total.
85. Open the Properties for Total.

86. On the Scripts tab, to the right of the Value field, click the Expression Editor button.
N
o
D

Workflow Management 2019


4-72 Module 4 – Forms

The Script Editor window appears.

y
op
87. In LAB-12 Example Script, copy Script 3.

var FinalQuantity=control.findByXmlNode("InStock").value +
control.findByXmlNode("OrderedQty").value;
var TotalAmount= FinalQuantity *control.findByXmlNode("UnitPrice").value;
return TotalAmount;

C
ot
N
o
D

Wonderware Training
Lab 12 – Scripting in Form Controls 4-73

88. In the Script Editor, paste the text.

Note: The script has been provided, but you can expand the ApproverArea in the left pane
as shown below to see information used to create the script. Additional information was used
for the final script, but to add In Stock, Ordered Qty, Unit Price, and Total controls, expand
Approver Area, and then expand RepairList and click In Stock, Ordered Qty, Unit Price,
and Total.

y
op
C
ot
89. Click Save & Close.
N
o
D

Workflow Management 2019


4-74 Module 4 – Forms

The Properties window reappears with the first line of the script displayed in the Value field.

y
op
90. Click Apply.
91. Preview the form.
C
ot
92. Scroll down to Repair List.
93. In the Product Type field, enter Hardware.
94. In the Size drop-down list, select Medium.
Both are concatenated in Product Code as HardwareME.
N

95. In the In Stock field, enter 3.


96. In the Ordered Qty field, enter 5.
97. In the Unit Price field, enter 200 and press the Tab key.
The Total updates to 1600.
o
D

Wonderware Training
Lab 12 – Scripting in Form Controls 4-75

You can add other records and do some more testing.


98. Close the preview.
Next, you will set the visibility of Approver Area.
99. In the form, scroll down to Approver Area.
100.Open the Properties for the Approver Area.

y
op
101.Click the Appearance tab.
102.For the Visible option, click No.

C
You are hiding this area because it should only be visible to Supervisor.
ot
N
o
D

103.Click Apply.

Workflow Management 2019


4-76 Module 4 – Forms

104.Preview the form and check that Approver Area is hidden.

y
op
105.Close the preview.
C
ot
106.In the form, repeat Steps 100 to 104 for Comments.
N
o
D

In the next lab, you will use parameters to make the two areas you hid visible only to
Supervisor.
107.Close the preview and the form.

Wonderware Training
Section 5 – Invoking Forms 4-77

Section 5 – Invoking Forms


This section describes the Fill Form and discusses how to use forms to initiate workflows. It
explains how to associate workflows to forms, trigger a workflow by submitting a form, and
access form data within the workflow. It also describes how to invoke forms from within a
workflow and explains form parameters and how to invoke Form activity.

Fill Form

y
Through the Work Tasks Pro mobile application, you can fill an item using the Fill Form option
available in the sliding menu. When a form is filled and submitted, a process is initiated.
Forms accessed through the Fill Form feature displays the Form Name as the form header.

op
To view Fill Form, swipe from the left edge of the screen, tap Fill Form. The available Fill Forms are
listed. Tap a form. The selected Fill Form screen appears. Fill the form. Tap FINISH to submit the
form. When you fill a form, a process is initiated.
To search a Fill Form, you can search for a specific Fill Form. On the Action bar, tap the Search
button. In the Search field, type the keyword for the Fill Form you want to search. The Fill Forms
containing the specified keyword are listed.

selected Fill Form is saved as a draft.


C
To save a Fill Form as a draft, swipe from the left edge of the screen, tap Fill Form. The available
Fill Forms are listed. Tap a form. The selected Fill Form screen appears. Tap the Draft button. The

Note: Fill Forms are automatically saved as Drafts every 30 seconds. You can enable Drafts to
save Fill Forms as drafts. Drafts is disabled by default.
ot
Invoke Form Activity
The Invoke Form Activity is an activity inside workflows, where the workflow invokes the form. The
invoking activity is also linked to an approval process. As an example, consider the Leave
Application Form. Once an employee fills out the Leave Application Form and submits it, the
N

associated workflow is triggered and the Form is invoked. It is sent to the reporting manager for
approval. The manager also has the option to make comments and approve/reject the submitted
form.
o
D

Workflow Management 2019


4-78 Module 4 – Forms

Collaboration Mode: The Invoke Form Activity is said to be in Collaboration mode when the
individual actor's response collaboration in Output Instance XML property is configured to collect
responses from multiple users.

y
op
C
ot
N
o
D

Activity Properties
The Invoke Form activity has to be configured by specifying appropriate values for the different
properties in the Activity Properties area. The Activity Properties can be accessed by clicking on
the Activity Properties tool in the toolbar or by selecting the appropriate option from the right-click
menu for the Invoke Form activity.

Wonderware Training
Section 5 – Invoking Forms 4-79

The Activity Properties are organized by groups of related properties. Each group is described
below.
Name & Description (Optional - set only if necessary)
 Name: Name for the activity
 Description: Brief description of the activity
Configuration
 Delivery Channels: Specify the delivery channels to deliver this activity to the assigned
actors. Multiple channels can be specified giving the actors different options to act on the
work item.

y
 Work Item Fields: Set the Work Item Fields to be used to display application data, as well
as value in variables and content in the Work items list when this activity is run.
Actors: Specify the actors who will work on the activity and related properties.

op

 Assign Actor(s): Specify the actor who will work on the Invoke Form activity. It is tagged
with the Ignore Unavailable Actors property, which in turn is tagged with the Alternate
Actor Allowed property.
 Assign Queue(s): Specify the queues to which the Invoke Form activity is to be assigned.
Exception Behavior (Optional - set only if necessary)
Each activity has the Raise error on unhandled linked output property. Configure this property

C
to raise an error if the output is not linked to the next activity in the workflow. You can also use this
property to define and configure email templates and users for the exception mail.
More information is available at: http://sun.skelta.com/index.htm#invokeformactivity.
ot
N
o
D

Workflow Management 2019


4-80 Module 4 – Forms

y
op
C
ot
N
o
D

Wonderware Training
Section 6 – Using Invoke Form Activity and Getting Data from a Form 4-81

Section 6 – Using Invoke Form Activity and Getting Data from a


Form
This section explains the following properties of the Invoke Form activity: Form Information,
Notification Contents, Decision Influencers, and Responses and Outputs. It also explains how to
create XML variables for forms within a workflow using both the Create an Output Instance XML
variable from the Invoke Form activity's properties and the XML variables from the Start activity's
properties and the Get Schema from FORM option. In addition, it describes how to use multiple
outputs in a form, including how to configure outputs in the form and handle outputs within a
workflow.

y
Invoke Form Activity

op
The Activity Properties are organized by groups of related properties. The groups specific to this
activity are described below.
Configuration (Mandatory - must be set to run activity)
Form Information
 Form Name: Opens the Invoke Form - Form Name window

C
ot
N
o

The Form Name window has the following fields:


D

 Associated Form: Name of the associated form.


 Select Form: Select the Form name from this drop-down list. The predefined
SKAWS_Users Form associated with the User list will also be available in this list.
 Version: Select the version from this drop-down list; the default value is Latest
Version.

Workflow Management 2019


4-82 Module 4 – Forms

 Input Instance XML: This property is used to display the data in the forms that is being
used in the Invoke Form activity. When the user views this form in the work item, the data
available in the selected Input Instance XML variable will be displayed if the form has the
same schema as the selected XML variable.
You can also Use Expression Editor to build the expression to get the XML variable name.
This is useful if you do not know the values of the properties at the time of designing the
form.
To show a blank form as part of the Invoke Form activity, do not select an Input Instance
XML from the Input Instance drop-down list. The form is then displayed with all the fields

y
as blank.
If the user wants to display an existing list item data, the Input Instance XML variable
selection should be a List XML type.

op
 Update form parameters: This property is used to update the form parameter details.
Note: It is important to first select a form.
A parameter represents a value that is passed to a variable. The parameter value is
defined when the variable is declared in the procedure. A procedure can be defined with
no parameters, one parameter, or more than one. The part of the procedure definition that
specifies the parameters is called the parameter list.

C
Here, parameters represent the form variables, which the user can define while designing
the form. These parameters can be used in Form scripts, in user look up controls to build
the filter expression, and as a parameter for the lookup query.
Note: Form parameters values are not stored either in form definition or in database.
These values are rendered when the form is rendered.
Save as Draft?: Click the Expression Editor to build an expression. Select an option (Yes
ot

or No) from the drop-down list. Selecting Yes will allow you to save it as a draft, while
selecting No will not save it as a draft.
 Close the form on click of Save As Draft?: If this property is set as Yes, the edited form
will automatically get closed when you click Save as Draft?.
 Form to be opened on work item multi - select: This property enables you to specify
the form that needs to be opened when multiple Invoke form work items are selected for
N

processing. This also enables you to select multiple work items related to Invoke Form
Activity and act on them from the Work items list or Inbox. The form selected opens on
selection of a Work Item or multiple Work Items. On submission, the content gets updated
for all the workflow instances.
You need to make sure that the form used for multi-select has the same XML node
structure as used for Output Instance XML property. This ensures that the inputs provided
o

in the form get updated to the respective workflow instances output instance XML nodes.
The update to output instance XML depends on Update output instance XML only for
completion maker outputs configured for the Possible Distinct Outputs property. The
D

behavior is overridden with copying only a specific node, when the Invoke form activity is
to be used in response collaboration mode.
Note: In the multi-select scenario, the inputs given to the form from the workflow using
Input Instance XML property will not be populated when the form is opened.

Wonderware Training
Section 6 – Using Invoke Form Activity and Getting Data from a Form 4-83

Notification Contents
You can use the properties in the Notification Contents group to specify the content used to
notify actors about the activity.
 Subject: This is the subject of the Approval request. The subject can be customized for
each actor.
 Body: This is the actual message body of the Approval request sent to the actors. The
message can be customized for each actor.
Decision Influencers

y
You can use the properties in the Decision Influencers group to specify some parameters that
influence the outcome of the activity.
 Max Actors Required For Invoke Form Completion [% or Number]: This property is
used to check what percentage or number of actors should take action for Invoke Form.

op
Decision on the Invoke Form is taken only after the specified number or percentage of
actors have taken the action. The activity waits for the actors' action until the timeout for
activity is reached.
 Min Actors Required For Invoke Form Completion [% or Number]: This property
specifies the minimum number of actors to act on the Invoke Form before the Timeout
Warning for Activity. If the activity limit is reached before the Timeout Warning for Activity,
then the warning message is not shown.

C
Possible Distinct Outputs: This property is used to specify multiple conditions using
form button and form control values and set different outputs for the Invoke Form activity.
Each output can be marked as completion maker or not. If no output is marked as
completion maker, the task remains in the Inbox. It is used to set whether the output
instance XML is to be updated with the input data of the form for all the outputs or only for
the outputs that are the completion-maker type.
ot
Escalation & Timeout
You can use the properties in the Escalation & Timeout group to specify escalation and
timeout settings for the activity.
 Set Calendar for Timeout: This property is used to specify the calendar to be used to
determine activity timeouts.
N

 Minimum available time for Activity: This property is used to check the availability of an
actor to whom a task must be assigned while executing the activity. The availability check
for the actor is done based on the Calendar settings (Global or Resource Calendar). If the
time taken to complete the task is within the value set for the Minimum available time for
Activity property, then the task will be assigned to that actor. However, if the time taken to
complete the task exceeds the value set for the Minimum available time for Activity
o

property, then the task will be assigned based on the values set for the Ignore Unavailable
Actors? and Alternate Actor Allowed? properties.
 Timeout Warning for Ownership: This property specifies the time at which a warning is
provided to an actor to take ownership of the work item assigned to him/her. If the actor
D

does not take ownership within this time, the engine is notified with a warning. Therefore, if
Min.Ownerships is set, and it is not satisfied before the given time, then a warning is sent.
If Min.Ownerships is 0, it will check for Max.Ownerships. If the ownership count does not
reach the Max.Ownerships value within the set time, a warning is sent. If both
Min.Ownerships and Max.Ownerships are not set, this property is ignored.
 Timeout for Ownership: This property specifies the time until which actors are allowed to
take ownership, that is, the time until which the Approval activity will wait for actors to take
ownership. If Min.Ownerships is set and is not reached, the work item is removed from all
Work Item lists. If Min.Ownerships is 0, it will check if ownership count is less than

Workflow Management 2019


4-84 Module 4 – Forms

Max.Ownerships. If it is, the work item is removed from all Work Item lists. Otherwise, the
work item will be removed from the Work Item lists of those who have not taken
ownership. The work item will remain in the Work Item list of those who have taken
ownership and wait for action from them.
 Timeout Warning for Activity: This property specifies the time at which a warning is
provided to an actor to take ownership of the work item assigned to him/her. If the actor
does not take ownership within this time, the engine is notified with a warning. Therefore, if
Min.Ownerships is set, and it is not satisfied before the given time then a warning is sent.
If Min.Ownerships is 0, it will check for Max.Ownerships. If the ownership count does not
reach the Max.Ownerships value within the set time, a warning is sent. If both

y
Min.Ownerships and Max.Ownerships are not set, this property is ignored.
 Timeout for Activity: This property's value is used to decide until what time the work item
should wait for user action. If properties such as Max.Ownerships, AAA, AL are set, once

op
the property values are reached, the work item is removed from the Work Item lists of all
the approvers. When the timeout is reached, the following checks are made: If AL is set,
when the activity count, that is, the number of approvals or rejections (AC) < AL, then the
timeout for activity is performed and the activity is removed from all Work Item lists. If AC >
AL, it checks with the number of approvals or decision count (DC) and AAA. If DC >= AAA
(if it is set), the work item is considered approved; otherwise, it is rejected. If AAA = 0 and
if DC >= AL, the work item is considered approved; otherwise, it is rejected. If AL = 0 and
AC < AAA, then the timeout for activity is performed and the work item is removed from all

 C
Work Item lists. If AL = 0 and AC > AAA, it will check with DC. If DC > AAA it is approved;
otherwise, it is rejected. If AL = 0 and AAA = 0, then if DC is at least 1, it is considered
approved; otherwise, it is rejected.
Multiple TimeOut Warning: This is used to set recurring timeout warnings that will be
sent to the actors who have to take action. To set multiple timeout warnings, click the
Multiple TimeOut Warning button in the Properties pane for the Approval activity. A new
ot
window appears. In this window, set the interval for the recurring warning as well as the
output message. You can also set the Recurring Time Interval. This can be used to set a
different recurring time out after the first timeout happens. For example, if Time Interval for
the property is set as 7 days and Recurring Time Interval is set as 2 days, then the first
time out will happen after 7 days and there will be a recurring time out every second day
after the seventh day (first) time out.
N

Responses and Outputs


You can use the properties in the Responses and Outputs group to specify the responses and
outputs of the activity.
 Output Instance XML: This property is used to get the data from the Forms which the
user has edited from the Work item page. Depending on the type of XML variable selected
in this property, the XML data is stored if the output instance XML has the same schema
o

as the form.
Use Expression Editor to build the expression to get the XML variable name. This is useful
if you do not know the values of the properties at the time of designing the form.
D

 Hide Responses: If this property is set to No, then actors can see the responses of other
actors in a group approval scenario. To view these responses, that is, ownerships,
approvals, or rejections, select the Take Ownership option. This will open a new pop-up
window with the responses of other actors who have taken ownership.
After the actor has taken ownership, a link is provided to the actor, which opens a pop-up
window with the details of the other approvers. The link will be provided only if the Hide
Responses property is set as No. The pop-up window will have details such as Approver
name, Ownership Status, Action taken, Comments.

Wonderware Training
Section 6 – Using Invoke Form Activity and Getting Data from a Form 4-85

See http://sun.skelta.com/ for additional information on the Invoke Form Activity.

y
op
C
ot
N
o
D

Workflow Management 2019


4-86 Module 4 – Forms

y
op
C
ot
N
o
D

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-87

Lab 13 – Using Invoke Form Activity and


Reading Form Data in Workflow

Introduction
In this lab, you will import the Lab8 workflow to use as a base for the workflow you will use with the
form. You will also build on the form you created in the last lab using the Invoke Form Activity and
use the form to capture spill details. You will use the Invoke Form activity to call the form in a

y
workflow and assign it to the plant operator. After the operator fills in the details and submits the
form, the task moves to the next level to the supervisor for approval. After the request is approved
or rejected, a notification is sent to the operator. You will use the Save As Draft property of the

op
Invoke Form activity and will also pass the parameters to the form using Input XML data and
Output XML data in the Invoke Form activity. In addition, you will read form data in a workflow.

Objectives
Upon completion of this lab, you will be able to:
 Use Invoke Form activity


Check Save As Draft option

Pass value for form parameter


C
Define custom Action Output Using Possible Distinct Outputs

Use Input XML data and Output XML data for Invoke Form activity
Read form data in workflow
ot
N
o
D

Workflow Management 2019


4-88 Module 4 – Forms

Edit the Form


First, you will perform additional configuration in the Lab12 form to make the Approve and Reject
functions available for use with the Invoke Form activity, using Approve and Reject buttons.
1. Ensure you are logged into Enterprise Console as the admin user.
2. On the Forms page, open the Lab12 form.
3. From the Controls pane, drag two buttons to the bottom of the form.

Note: When you place the buttons, ensure the dotted line appears at the very bottom of the

y
form.

op
C
4. Open the Properties for the first button and configure as follows:
ot
Name:
XML Node: Approve
Button Text: Approve
Button Type: Submit
N
o
D

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-89

5. Configure the Advanced tab as follows:

Form Button: Yes

This places the button at the bottom-right of the form.

y
op
6. Click Apply.
C
ot
The button name is updated.
N
o
D

Workflow Management 2019


4-90 Module 4 – Forms

7. Open the Properties for the second button and configure as follows:

Name:
XML Node: Reject
Button Text: Reject
Button Type: Submit

y
op
8. Configure the Advanced tab as follows:
C
ot
Form Button: Yes

This places the button at the bottom-right of the form.


N
o
D

9. Click Apply.

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-91

The button name is updated.

10. To view the finished form, on the toolbar at the top of the page, click Preview .
The finished form appears. Note the buttons you added.

y
op
C
ot
11. Close the preview.
N

12. To publish the form, in the toolbar, click Publish .


A message appears confirming that the item was published successfully.
13. Click Close.
14. Close the Forms Designer window.
o
D

Workflow Management 2019


4-92 Module 4 – Forms

Export and Import a Workflow


Next, you will export the Lab8 workflow, so that you can use it as a base for the workflow you will
create. Then, you will create a new workflow and import the exported Lab8 workflow.
15. In the Enterprise Console, on the Workflows page, unpublish the Lab8 workflow, and then
export it to the C:\Training folder.
16. Create and save a new standard workflow with the following title and description:

Title: Lab13

y
Description: Using Invoke Form Activity and Reading Form Data in Workflow

op
The Process Designer appears.

C
Note that at the top-right of the window, TrainingRepository / Lab13 / 1 is visible.
17. Import the Lab8_1.xml file from C:\Training.
ot
N
o
D

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-93

Configure a Workflow
Now, you will modify the Lab8 workflow to include the Invoke Form activity.
18. Select the Approval activity named Approve Cleaning Spill, and then press the Ctrl key and
select the Rejected linking line and the Information activity named Notify Operator on
Rejection and move them down as shown below:

y
op
C
ot
19. Move the Information activity named Notify Supervisor on Spill to the left and reposition the
linking lines for the activities you moved as shown below:
N
o
D

Workflow Management 2019


4-94 Module 4 – Forms

20. In the Activities pane, ensure Human Activities is selected, and then drag two Invoke Form
activities and three Information activities to the design mosaic as shown below.

Note: The numbers on your activities may differ.

y
op
C
ot
N
o
D

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-95

Now, you will configure the activities you added. First, you will configure the Information activities.
21. Use the Activity Properties pane to configure the Information activities as follows and save
each configuration.
Information7

Name: Notify Operator of Approved


Description: Notification of Approval
Assign Actor(s): Joe (Operator 1)

y
Information8

Name: Notification Action Reminder


Description: Notification that operator has not taken action

op
Assign Actor(s): Joe (Operator 1)

Information9

Name: Notify Operator of Reject


Description: Notification of Rejection
Assign Actor(s): Joe (Operator 1)

C
ot
N
o
D

Workflow Management 2019


4-96 Module 4 – Forms

Next, you will configure the Invoke Form activities, which have new areas you have not
configured before, like Form Name, which indicates the form you are calling into the workflow,
Save as Draft, Output Instance XML, which contains the form data in XML format, Input
Instance XML, and Update form parameters.
22. Configure and save the Invoke Form1 activity as follows:

Name: Invoke Submittal Form


Description: Send EPI Submittal Form to Operator
Assign Actor(s): Joe (Operator 1)

y
23. Scroll down to the Form Information area.
24. Under the Form Name property, click the gray button to the right of the Select Form Details
field.

op
The Invoke Submittal Form-Form Name window appears.
25. In the Select Form drop-down list, select Lab12.

C
ot
N

26. Click Submit.


The field is updated.
o
D

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-97

27. Under the Save as Draft? property, click the Select Option drop-down list and select No.
Setting the value of the Save as Draft property as Yes would show a Save As Draft button on
the form when it is accessed in a user’s Inbox. The button allows the user to continue working
on the form at a later time.
28. Click Save.
The field is updated.

y
op
29. Scroll down and expand Escalation & Timeout.
30. Scroll down and in the Timeout warning for Activity field, enter 0.00:05:30 to set a 5-minute
and 30-second timeout warning.
31. In the Responses & Outputs area, under the Output Instance XML property, click the gray
button to the right of the Create a Output Instance XML variable field.
The Invoke Submittal Form-Output XmlVariable window appears.

C
32. In the Select Form drop-down list, select Lab12.
33. In the XmlVariable Name field, enter OutputXmlEPISubmittal.
ot
N
o

34. Click Submit.


The variable is created and added to the Output Instance XML drop-down list and is
automatically selected. This variable contains the form data in XML format.
D

35. Click Save.

Workflow Management 2019


4-98 Module 4 – Forms

The Invoke Submittal Form activity is now configured.

36. Configure and save the Invoke Form2 activity as follows:

y
Name: Invoke Approval Form
Description: Send EPI Approval Form to Supervisor
Assign Actor(s): Lenny (Supervisor 1)

op
37. Scroll down to the Form Information area.
38. Under the Form Name property, click the gray button to the right of the Select Form Details
field.
The Invoke Approval Form-Form Name window appears.
39. In the Select Form drop-down list, select Lab12.

C
ot
N

40. Click Submit.


o

The field is updated.


D

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-99

41. Under the Input Instance XML property, click the drop-down list and select
OutputXmlEPISubmittal.
OutputXmlEPISubmittal was the output you used with the Invoke Submittal Form activity.
You will now use it for input.

42. Under the Save as Draft? property, click the Select Option drop-down list and select Yes.

y
43. Click Save.
The field is updated.

op
44. In the Responses & Outputs area, under the Output Instance XML property, click the gray
button to the right of the Create a Output Instance XML variable field.

C
The Invoke Approval Form-Output XmlVariable window appears.
45. In the Select Form drop-down list, select Lab12.
46. In the XmlVariable Name field, enter OutputXmlEPIApproval.
ot
N
o

47. Click Submit.


The variable is created and added to the Output Instance XML drop-down list and is
D

automatically selected. This variable contains the form data in XML format.

48. Click Save.

Workflow Management 2019


4-100 Module 4 – Forms

The Invoke Approval Form activity is now configured.

Next, you will link the buttons you created earlier with the Invoke Approval Form activity.

y
49. With the Invoke Approval Form activity selected, scroll down to Decision Influencers and
expand the area.
50. For the Possible Distinct Outputs property, click the gray button.

op
C
The Invoke Approval Form-Decisions window appears.
51. At the top-right, click Generate condition for form buttons.
ot
N
o
D

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-101

The window is updated with button information.

y
op
C
52. At the bottom-left of the window, in the third Output field, delete the @ symbols.
ot
N
o
D

Workflow Management 2019


4-102 Module 4 – Forms

53. Press the Tab key and click Next.


A window appears with the names of the buttons listed and Yes selected in the right column.
The Yes indicates that when the button is clicked, the request is completed.

y
op
54. Click OK.
The changes are applied.
C
ot
55. Click Save.
N
o
D

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-103

56. Add a linking line from the Approval activity named Approve Cleaning Spill to the
Information activity named Notify Supervisor on Spill, and label it Rejected.
57. Add a linking line from the Approve Cleaning Spill activity to the Invoke Submittal Form
activity, and label it Approved.
58. Add a linking line from the Invoke Submittal Form activity to the Information activity named
Notification Action Reminder, and label it Timeout Warning - Action.
59. Add a linking line from the Invoke Submittal Form activity to the Invoke Approval Form
activity, and label it Action Completed.

y
60. Add a linking line from the Invoke Approval Form activity to the Information activity named
Notify Operator of Approved, and label it Approve.
61. Add a linking line from the Invoke Approval Form activity to the Information activity named

op
Notify Operator of Reject, and label it Reject.

C
ot
N
o
D

Workflow Management 2019


4-104 Module 4 – Forms

Publish and Test Run


You will be making modifications to the Lab12 form you will import. However, you will first test this
form before you make those modifications.
62. Click Publish and Test Run.

You may have to refresh the page.


The Analyst’s View appears. The Check-List on Spill is awaiting approval.

y
op
64. Close the window.
65. Log in as Joe.
C
63. Click the Check-List on Spill activity and note that Joe needs to take action.
ot
66. In the Work items list, click the top item.
The WorkItem Detail View appears with the Check-List items on the right.
67. In the What's the reason for the spill? field, enter Speed.
68. In the Which areas got affected? area, check Conveyor Belt and Control Panel.
N

69. In the What’s the estimated size of the spill? drop-down list, select Medium.
o
D

70. Click Submit.

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-105

71. Use the Reports menu to check the Awaiting status.


The Approve Cleaning Spill is awaiting an action.

y
op
72. Click the Approve Cleaning Spill activity and note that Charlee needs to take action.
73. Close the window.
74. Log in as Charlee.

C
75. In the Work items list, click the item.
76. In the WorkItem Detail View, click Approve.
The task is removed from the Work items list.
77. Log in as the admin user.
ot
78. Use the Reports menu to check the Awaiting status.
The Invoke Submittal Form is awaiting approval.
N
o
D

79. Click the Invoke Submittal Form activity and note that Joe needs to take action.
80. Close the window.
81. Log in as Joe.
82. In the Work items list, click the top item.

Workflow Management 2019


4-106 Module 4 – Forms

The EPI Approval Form appears with the Approve/Reject buttons you configured. This is the
form with the hidden areas for this level, which only the supervisor level will be able to see.
83. In the Drum Number field, enter D123.
84. In the Speed field, enter 600.
85. In the Incident Date and Time field, select any date.
12:00 AM will be added to the date automatically.
86. In the Incident Reason drop-down list, select Human Error.

y
87. In the Action Taken field, enter Informed Cleaning Crew.

op
C
ot
N
o

88. Click Finish.


The task is removed from the Work items list.
89. Use the Reports menu to check the Awaiting status.
D

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-107

The Invoke Approval Form is awaiting approval.

y
op
91. Close the window.
92. Log in as Lenny.
C
90. Click the Invoke Approval Form activity and note that Lenny needs to take action.
ot
93. In the Work items list, click the top item.
The EPI Approval Form appears with the buttons you configured at the bottom-right,
including Save As Draft.
N
o
D

Workflow Management 2019


4-108 Module 4 – Forms

94. Click Approve.


If you approve or reject the form, the results will be recorded.
95. Use the Reports menu to check the Completed status.

y
op
Update the Form
C
Now, you will modify the script in the Lab12 form. The current script will not work with the Invoke
Form activities.
ot
96. Log in as the admin user.
97. On the Forms page, unpublish the Lab12 form and open it.

98. Open the Properties for the form.


99. Click the Scripts tab.
N

Note the script information in the On Form Load field.


o
D

100.Open the Expression Editor .

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-109

The Script Editor window appears.

y
101.Select the entire script and on the toolbar, click Clear All .
A message appears confirming that you want to clear the script editor.

op
102.Click OK.
103.Click Save and Close.
104.Click the Advanced tab. C
105.In the Forms Parameters area, click Add Parameter .
ot
106.In the Parameter Name field, enter IsSupervisor.
107.In the Parameter Type drop-down list, select Number.
N
o
D

108.Click Apply.
You have created the parameter.

Workflow Management 2019


4-110 Module 4 – Forms

Now, you will add a script that will specify when to show the hidden fields in the form.
109.Open the form properties.
110.Click the Scripts tab.

111.Open the Expression Editor .


The Script Editor window appears.
112.In File Explorer, navigate to C:\Training\Scripts.
113.Open LAB-13 Example Script and copy Script 1.

y
if( control.topLevelForm.formParameters["IsSupervisor"].value==1 )
{

op
control.findByXmlNode("Comments").visible=true;
control.findByXmlNode("ApproverArea").visible=true;
control.findByXmlNode("Approve").visible=true;
control.findByXmlNode("Reject").visible=true;
}

114.In the Script Editor, paste the text.


C
ot
N
o

115.Click Save and Close.


D

Warnings appear.
116.Click OK.
The Properties window reappears with the first line of the script displayed in the On Form
Load field.
117.Click Apply.

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-111

118.In the Lab12 form, scroll down to Approver Area.


119.For the text control named ApproverName, open the properties and click the Scripts tab.

120.In the Value field, open the Expression Editor .


121.In LAB-13 Example Script, copy Script 2.

var UID= SFU.getVirtualActorId();


var UserInfo=SFU.getUserLookupExtendedInformation(UID);
return UserInfo.UserDisplayName;

y
op
122.In the Script Editor, paste the text.

C
ot
123.Click Save and Close.
124.In the warning message, click OK.
N

125.In the Properties window, click Apply.


126.In the Approver Area, for the text control named Email, open the properties and click the
Scripts tab.

127.In the Value field, open the Expression Editor .


o

128.In LAB-13 Example Script, copy Script 3.

var UID= SFU.getVirtualActorId();


var UserInfo=SFU.getUserLookupExtendedInformation(UID);
D

return UserInfo.Email;

Workflow Management 2019


4-112 Module 4 – Forms

129.In the Script Editor, paste the text.

130.Click Save and Close.


131.In the warning message, click OK.

y
132.In the Properties window, click Apply.
133.Repeat Steps 126 to 132 for the text control named Department and use Script 4.

op
var UID= SFU.getVirtualActorId();
var UserInfo=SFU.getUserLookupExtendedInformation(UID);
return UserInfo.UserDepartment;

C
Next, you will review the current parameters.
134.Open the properties for the form.
ot
135.On the Scripts tab, open the Expression Editor .
The Script Editor window appears with the form parameters for Supervisor. If the value
equals 1, which means the Supervisor is logged in, the form will show all the areas and
buttons specified in the script.
N
o

136.Click Cancel, and then click Apply.


Now, you will set the buttons that will be visible only to the Supervisor to be hidden by default.
137.In the form, open the properties for the Approve button.
D

138.On the Appearance tab, for the Visible option, click No.
139.Click Apply.
140.Repeat Steps 137 to 139 for the Reject button.

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-113

141.Preview the form to ensure the Comments text box and Approve and Reject buttons are not
visible.
The Approver Area was hidden in the last lab.

y
op
C
ot
142.Close the preview.
143.Publish the form.
N

A message appears confirming that the item was published successfully.


144.Click Close.
145.Close the Forms Designer window.
o
D

Workflow Management 2019


4-114 Module 4 – Forms

Next, you will configure the Invoke Form activity named Invoke Approval Form to give the
supervisor rights to see the hidden areas of the form.
146.In the Enterprise Console, on the Workflows page, unpublish and open Lab13.
147.Click the Invoke Form activity named Invoke Approval Form.
148.In the Activity Properties pane, scroll down to the Form Information area and under
Update form parameters, click the gray button.
The Form Parameters window appears.

y
op
149.Click Select. C
Another window appears with Form Parameters listed.
ot
150.Expand Form Parameters.
The Form Parameter that you declared, Parameter.IsSupervisor, is listed.
N
o
D

151.Click Parameter.IsSupervisor.

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-115

The parameter moves up to the Condition field.


152.In the Value field, enter 1.
You are hard coding the value, but you could have used a variable as well.

y
op
153.Click OK.
The parameter is saved.
C
ot
154.To check if it was saved, click the gray button in the Update form parameters area, check
that the value is 1, and then close the Form Parameters window.
This step is not required. It was only so that you could see that the parameter is saved after
you click OK. With this change, the supervisor can see the hidden areas on the form, but no
other user can.
N

Publish and Test Run


Now, you will test the updated workflow.
155.Click Publish and Test Run.
The Analyst’s View appears. The Check-List on Spill is awaiting approval.
o
D

Workflow Management 2019


4-116 Module 4 – Forms

156.Click the Check-List on Spill activity and note that Joe needs to take action.
157.Close the window.
158.Log in as Joe.
159.In the Work items list, click the top item.
The WorkItem Detail View appears with the Check-List items on the right.
160.In the What's the reason for the spill? field, enter Excessive Speed.
161.In the Which areas got affected? area, check Conveyor Belt and Control Panel.

y
162.In the What’s the estimated size of the spill? drop-down list, select Medium.

op
C
ot
N

163.Click Submit.
164.Use the Reports menu to check the Awaiting status.
The Approve Cleaning Spill activity is awaiting an action.
o

165.Click the Approve Cleaning Spill activity and note that Charlee needs to take action.
166.Close the window.
167.Log in as Charlee.
D

168.In the Work items list, click the item.


169.In the WorkItem Detail View, click Approve.
The task is removed from the Work items list.
170.Log in as the admin user.
171.Use the Reports menu to check the Awaiting status.
The Invoke Submittal Form activity is awaiting an action.

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-117

172.Click the Invoke Submittal Form activity and note that Joe needs to take action.
173.Close the window.
174.Log in as Joe.
175.In the Work items list, click the top item.
The EPI Approval Form appears. This is the form with the hidden areas for this level, which
only the supervisor level will be able to see.
176.In the Drum Number field, enter D139.

y
177.In the Speed field, enter 789.
178.In the Incident Date and Time field, select any date.
12:00 AM will be added to the date automatically.

op
179.In the Incident Reason drop-down list, select Conveyor Fault.
180.In the Action Taken field, enter Informed the Team.

C
ot
N
o
D

181.Click Finish.
The task is removed from the Work items list.

Workflow Management 2019


4-118 Module 4 – Forms

182.Use the Reports menu to check the Awaiting status.


The Invoke Approval Form is awaiting approval.
183.Click the Invoke Approval Form activity and note that Lenny needs to take action.
184.Close the window.
185.Log in as Lenny.
186.In the Work items list, click the top item.
The EPI Approval Form appears, revealing the previously hidden areas, including the

y
Approve and Reject buttons.

op
C
ot
187.Scroll down to Repair List.
N

188.In the Product Type field, enter Fan.


189.In the Size drop-down list, select Medium.
Both are concatenated in Product Code as FanME.
190.In the In Stock field, enter 2.
191.In the Ordered Qty field, enter 5.
o

192.In the Unit Price field, enter 100 and press Tab.
The Total updates to 700.
D

193.Click Approve.

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-119

194.Use the Reports menu to view the Completed status of the workflow.

y
op
C
ot
N
o
D

Workflow Management 2019


4-120 Module 4 – Forms

Next, you will read and display form data on what has been approved. This is possible because of
the Invoke Form activity.
195.On the Workflows page, unpublish and open Lab13.
196.In the workflow, open the properties for the Notify Operator of Approved activity.
197.Expand Notification Contents, and then for the Subject property, click the gray button.
198.In the field drop-down list, select XML Variables.
The second drop-down list is populated with the output data.

y
199.In the second drop-down list, select OutputXmlEPIApproval.
The third drop-down list is populated with the form data.
200.In the third drop-down list, select DrumNumber.

op
201.Click Append.
The DrumNumber variable is added to the bottom window.

C
ot
N
o
D

Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-121

202.Click at the end of the line, and then repeat Steps 200 and 201 to add ActionTaken.

y
op
203.Click Update, and then click Save.
C
ot
204.Click Publish and Test Run, and then follow the entire approval cycle.
N
o
D

Workflow Management 2019


4-122 Module 4 – Forms

y
op
C
ot
N
o
D

Wonderware Training
y
op
Section 1 – Generic Table List
C Module 5 – Lists
5-3
ot
Lab 14 – Creating a Generic Table List 5-7
Section 2 – Existing Table List 5-29
Lab 15 – Creating an Existing Table List 5-31
N

Section 3 – Workflow Management Lookup 5-53


Lab 16 – Reading Data Using a Workflow Management Lookup 5-59
o
D
5-2 Module 5 – Lists

Module Objectives
 Explain the importance of a Workflow Management list
 Describe a Workflow Management list
 Create a list with a generic table option
 Discuss a list-generated form
 Create a list with an existing table option
 Explain the Workflow Management Lookup
 Access lists from a form using the drop-down control

y
op
C
ot
N
o
D

Wonderware Training
Section 1 – Generic Table List 5-3

Section 1 – Generic Table List


This section explains a generic table list. It describes how to configure a generic table list and
generate a Workflow Management form with a generic table list.

Workflow List
The Workflow List is a list of workflows and folders that contain workflows. The Workflow List
provides a central interface that enables categorization of workflows. For Example, if you have

y
multiple workflows, organizing these different processes into different folders would be
advantageous. Also, different permissions can be set for different directories.
Actions that can be performed for a Workflow list are:

op
 Create a folder
 Create and view workflow attributes
 Create new InfoPath, File Watcher, Microsoft SharePoint, List, and BAM workflows
 Publish a workflow
 Associate a workflow with Microsoft SharePoint, BAM, File Watcher, InfoPath, and
Enterprise Console Lists


Disable or delete a workflow
Manage security settings
C
Organize workflow items by grouping them into folders
Manage the version changes to a workflow

Workflow Management allows you to create a list and store the data inside the list. You can map
ot
your list to a single table or multiple tables and also map to an existing table or a generic table that
is provided by Workflow Management. You can connect to lists with various APIs from an external
environment, and associate various events to workflow activities.
A list in Workflow Management generates the form automatically where the form works like the
interface. User Form information is stored in the database with the help of this list.
N

There are two types of Lists in Workflow Management:


 Generic List: Data entered in Generic Lists; stored in a Repository table called
SKEListItemDataNV. All data entered in generic lists is stored in the table without any
user-defined column names. Data is stored in the table using the datatype for that column.
 Existing Table: Used to store list data in a user-defined table with preferred user-defined
column names.
o

List Table
The List Table control is used to select a table for storing list data. The available tables are:
D

 Generic Table
 Existing Table
In the Select Table screen, select the Generic Table option and click Select. The corresponding
Properties dialog box opens. There are two tabs for setting the properties: Basic and Advanced.

Workflow Management 2019


5-4 Module 5 – Lists

Basic
Field Description
Tag name Enter a tag name that identifies the control name.
Description Enter a description for the control.
Mapped XML Node This field displays the XML node mapped to the control. It allows mapping of a List
to a Form and the Form to a Workflow. When you add a control for the first time, the
XML Node is dynamically altered to reflect the Tag Name.
Note: Editing the Mapped XML Node at a later instance will affect the mapping
between Forms, Lists, and Workflows.

y
Table Name This field displays the database table name to which the list main form is bound.
To edit the table, click the Table button and select the required table.

op
Advanced
Field Description
Id The reference identification code in this field is generated automatically.

Creating a Specific List

C
Workflow Management allows you to create a list and store the data inside the list. You have the
provision to map your list to a single table or multiple tables and also to map to an existing table or
a generic table that is provided by Workflow Management.
Create your list from the Manage List page, filling in the appropriate fields. Be sure to select Yes
for the Is Folder Supported? option to make your list folder supported. This way, you can organize
your list in folders.
ot
Note: If the Title field is removed from the base list, folder is not supported for the list.

Click Save and Continue. The Select Table window is displayed. In this case, you will map your list
to the Generic table that is provided by Workflow Management. Select the Generic Table option,
which is selected by default. Click Next. The List Designer page is displayed.
N

Lists Designer
List Designer is a web-based design tool, with a drag-and-drop-capable interface, to create
functional lists. Drag a control from the toolbox to the design area to add the control to the list.
Dragging is also supported for repositioning and copying controls. Use List Designer to create
o

functional lists with various controls.


The Title field is displayed automatically. If the first field in your list is Name, drag and drop a
TextInput control from the Tool Box to the orange bar in the list name area. The property window of
the TextInput Control Property window appears.
D

Field Description
Tag name Enter a tag name as Name of Employee.
Description Enter the description for the control. This is not mandatory.
Mapped XML Node Click anywhere after entering the tag name. The Mapped XML Node field is filled
automatically.
Bound to DB Column This field specifies to which database column you want to map this field.

Wonderware Training
Section 1 – Generic Table List 5-5

Field Description
Mandatory Select Yes radio button to make this field mandatory.
Allow Sorting Selecting Yes will enable sorting by this field.

Note: For generic list, ensure that the Bound to DB column Name is not the same for both Parent
and Child control.

Enter the details, and then click Save. Design all the fields required for your list. Click Submit to
save the list. A form for your list is auto generated. Click Yes if you want to edit the auto generated

y
list form. Clicking No will take you to the List Manage page. There, you can see the list you
created.

op
Note: When you submit a list, a form is automatically created for the list. You can customize the
control properties or modify the properties on the Forms Designer page.

Next, you will create items for the list you created. To create list items, in the Enterprise Console,
click the Menu button, click Tools, and then click Manage List. The Manage List page appears.
When you click the list you created, the corresponding list item window is displayed. Since, you
just created this list, you will not find any items. You will notice that the column headings are the
same as your list. On the Ribbon bar, click New to create a new item. The New List Item window

C
appears. Enter the details. Ensure that all the mandatory fields are entered correctly. After entering
all the mandatory fields, click Submit. Now, you can see that a list item is added. In the same way,
you can create any number of list items for any list that you have created.
ot
N
o
D

Workflow Management 2019


5-6 Module 5 – Lists

y
op
C
ot
N
o
D

Wonderware Training
Lab 14 – Creating a Generic Table List 5-7

Lab 14 – Creating a Generic Table List

Introduction
In this lab, you will create a generic table list for equipment maintenance. This list will be useful to
capture details in the repository database about equipment maintenance. Generic table lists can
maintain information in a database without any programming. You will generate a form from a list
and add a list item.

y
Objectives
Upon completion of this lab, you will be able to:

op
 Create a generic table list
 Work with a list-generated form
 Add a list item using the Workflow Management Enterprise Console menu

C
ot
N
o
D

Workflow Management 2019


5-8 Module 5 – Lists

Create a Generic Table


With all the labs you have done, no data has been saved in the repository database. The Workflow
Management list allows you to save list data in the repository database. This is achieved using
tables. You can create two types of tables in Workflow Management: a generic table or a custom-
defined table. These tables produce two types of lists: generic table list and existing table list. You
will create a generic table and produce a generic table list.
1. Ensure you are logged into Enterprise Console as the admin user, and then in the
hamburger menu, click Tools | Manage List.

y
op
C
ot
The Manage List window appears.
N
o
D

2. Click New , and then on the toolbar that appears, click List .

Wonderware Training
Lab 14 – Creating a Generic Table List 5-9

The New List window appears.


3. In the Title field, enter Equipment MaintenanceGE.
4. In the Description field, enter Equipment Maintenance Generic Table List.
5. For Enable Folder Support?, leave the default Yes option.
This will enable you to set up folder permissions at this level.

y
op
6. Click Save & Continue.
The Select Table window appears.
C
7. In Option 1, leave the default setting of Generic Table.
ot
N
o
D

This option allows you to create a generic table list. With this list, you can drag and drop
controls in the list and the entries for the controls will be made in your repository database.
The list information is maintained in a table in the database. Note that when you create more
than one generic list, all the lists are stored in a single database table in the repository
database. However, with the existing table, you can create different tables.
8. Click Next.

Workflow Management 2019


5-10 Module 5 – Lists

The List Designer appears with a Tool Box with controls in the left pane and the title and
description of your table list in the right pane, as well as one control named Title.

y
op
C
It is very important that you do not delete the Title control, as deleting it will prevent the table
ot
from working. It is mapped to a database column. You will see later how to hide it if it is not
needed.
Next, you will add controls to the table. To add a control, you have to drag the control to either the
orange or green area that appears when you drag the control to the right pane. Releasing the
mouse anywhere else in the right pane will not work. To add a control after the last control, drag it
to the orange area. To add a control above another control, drag it to the green area above the
N

control. When you drag a control to the right pane, a green area appears above all controls in the
list.
o
D

Wonderware Training
Lab 14 – Creating a Generic Table List 5-11

Now, you will create the table, which when published, will be a form.

9. In the left pane, click the IntegerInput control and drag it to the right pane to the
orange area to add it after the last control.
The Properties window for the control appears.
10. In the Tag name field, enter Equipment Number.
11. Press the Tab key.
The Mapped XML Node is populated with EquipmentNumber.

y
12. In the Mandatory ? field, click the Yes option.

op
C
ot
13. Click Save.
N
o
D

Workflow Management 2019


5-12 Module 5 – Lists

The IntegerInput control named Equipment Number is added to the table list below the Title
control.

y
op
C
ot
14. In the left pane, click the TextInput control and drag it to the right pane to the
orange area.
15. Repeat Steps 10 and 11 and name the control Component Type.
16. In the Mandatory ? field, leave the default No option.
N
o
D

Wonderware Training
Lab 14 – Creating a Generic Table List 5-13

17. Click Save.


The TextInput control named Component Type is added to the table list below the
Equipment Number control.

y
op
C
18. Drag another TextInput control to the right pane to the green area above Component Type.
19. Repeat Steps 10 and 11 and name the control Problem Area.
ot
20. In the Mandatory ? field, leave the default No option.
N
o
D

21. Click Save.

Workflow Management 2019


5-14 Module 5 – Lists

The TextInput control named Problem Area is added to the table list above Component
Type.

y
op
C
22. Drag another TextInput control to the right pane to the orange area.
23. Repeat Steps 10 and 11 and name the control Component Size.
ot
24. In the Mandatory ? field, leave the default No option.
N
o
D

25. Click Save.

Wonderware Training
Lab 14 – Creating a Generic Table List 5-15

The TextInput control named Component Size is added to the table list below Component
Type.

y
op
C
ot
N
o
D

Workflow Management 2019


5-16 Module 5 – Lists

26. Add the following controls at the bottom of the table and configure as follows:
Control Name XML Node
IntegerInput Repair Cost RepairCost
IntegerInput Number of Units NumberofUnits
IntegerInput Total Total
TextInput Approved By ApprovedBy
DateInput Approved On ApprovedOn

y
op
C
ot
N

27. Click Submit to generate a form.


A message appears with an option to edit the auto-generated form.
o
D

28. Click OK.

Wonderware Training
Lab 14 – Creating a Generic Table List 5-17

A message appears confirming that the list is successfully saved and a form associated with
the list is generated.

29. Click OK.

y
The Forms Designer page appears with the generated form.

op
C
ot
N

Now, you will change the control types for some of the items in the list.
o

30. Hover over Problem Area and on the toolbar that appears, click the Replace button.
D

Workflow Management 2019


5-18 Module 5 – Lists

The Replacement Control Configuration dialog box appears.


31. In the Replacement Control drop-down list, select Check Box.
32. Keep the default settings for the Copy Similar Properties option.

y
op
33. Click Apply. C
The Forms Designer page reappears. The Problem Area control type has been changed,
but you cannot see the change. Later in the lab, you will make it visible by adding options.
ot
34. Change the control types for the following items in the list as shown below:
Name Control New Control
Component Type Text Radio Button
Component Size Text Drop-Down
N

You cannot see the change for Component Type. Later in the lab, you will make it visible by
adding options.
The change is visible for Component Size, but you will also add options later in the lab.
o
D

Wonderware Training
Lab 14 – Creating a Generic Table List 5-19

Next, you will add some options to the Problem Area check box control.
35. Open the Properties for Problem Area.

36. Under Options, click the Add Record button.


37. In the Text field, enter Line1.
38. In the Value field, enter Line1.
39. Add the other Problem Area check box options as follows:

Text Value

y
Line2 Line2
Line3 Line3
Line4 Line4

op
Line5 Line5

C
ot
N

40. Click Apply.


The form appears with the check box options.
o
D

Workflow Management 2019


5-20 Module 5 – Lists

41. Open the Properties for Component Type.

42. Use the Add Record button to add the Component Type radio button options as follows:

Text Value
Filter Filter
Fan Fan
Compressor Compressor

y
op
C
ot
43. Click Apply.
The form appears with the radio button options.
N
o
D

Wonderware Training
Lab 14 – Creating a Generic Table List 5-21

44. Use the Add Record button to add the Component Size drop-down list options as follows:

Text Value
Small Small
Medium Medium
Large Large

y
op
C
ot
45. Click Apply.
The options have been added to the drop-down list, but you cannot see them here. You will
see them when the form is published.
N
o
D

Workflow Management 2019


5-22 Module 5 – Lists

Now, you will hide the Title control because you do not need it in this form.
46. Open the Properties for Title.
47. In the Default Value field, enter N/A.

y
op
48. On the Appearance tab, for the Visible option, click No.

C
ot
N
o

49. Click Apply.


D

Wonderware Training
Lab 14 – Creating a Generic Table List 5-23

The form reappears with Title still visible. It will not be visible in the published form.

y
op
50. Publish the form.
A message appears confirming that the item was published successfully.
51. Click Close.
52. Preview the form.

C
Note the Title control is not visible and notice the updated controls.
ot
N
o
D

53. Close the preview.

Workflow Management 2019


5-24 Module 5 – Lists

Your list has been created, as well as a list-generated form. In addition, if you make a list entry, the
data will be stored in the database. A Lists command is added to the hamburger menu.

54. In the Enterprise Console, in the hamburger menu, click Lists , and then click
Equipment MaintenanceGE, which is the list you created.

y
op
The Equipment MaintenanceGE page appears.
C
ot
N
o

55. Click New , and then on the toolbar that appears, click List Item .
D

Wonderware Training
Lab 14 – Creating a Generic Table List 5-25

The New Item window appears with the form you created.
56. In the Equipment Number field, enter 1001.
57. For Problem Area, check Line1 and Line3.
58. For Component Type, click Filter.
59. In the Component Size drop-down list, select Medium.
60. In the Repair Cost field, enter 100.
61. In the Number of Units field, enter 3.

y
62. In the Total field, enter 300.
You can use a script to populate the Total field.

op
63. In the Approved By field, enter Lenny.
64. In the Approved On field, select any date.

C
ot
N

65. Click Finish.


The list file appears in the list. Anything you do in the list is maintained in the database.
o
D

Workflow Management 2019


5-26 Module 5 – Lists

Check the Lists in the Database


Now, you will check the database for your list-generated forms.
66. Open SQL Server Management Studio.
67. In the Server Name field, confirm your computer name.
68. In the Connect to Server dialog box, in the Authentication drop-down list, ensure Windows
Authentication is selected.

y
op
69. Click Connect.

C
Microsoft SQL Server Management Studio appears.
70. In the Object Explorer in the left pane, expand Databases.
71. Expand your repository database named RepoTrainingDB.
ot
N
o
D

Wonderware Training
Lab 14 – Creating a Generic Table List 5-27

72. Expand Tables, and then scroll down to dbo.SKEListItemDataNV and right-click and select
Select Top 1000 Rows.

y
op
The table opens in the right pane with the information from your list. This is a generic table with
more than 150 columns with generic column names. If you create another list, the data for that
list will be saved here, which is why there is no specific column name. To have specific column
names, you would use the existing table list, which is covered in the next lab.

C
ot
N

73. Scroll over and review the column headings and data.
74. Leave SQL Server Management Studio open, as you will use it in the next lab.
o
D

Workflow Management 2019


5-28 Module 5 – Lists

y
op
C
ot
N
o
D

Wonderware Training
Section 2 – Existing Table List 5-29

Section 2 – Existing Table List


This section explains the need for an existing table list. It describes how to create a table list and
modify a Workflow Management form generated with an existing table list.

Workflow List
The Workflow List is a list of workflows and folders that contain workflows. The Workflow List
provides a central interface that enables categorization of workflows. For Example, if you have

y
multiple workflows, organizing these different processes into different folders would be
advantageous. Also, different permissions can be set for different directories.
Actions that can be performed for a Workflow list are:

op
 Create a folder
 Create and view workflow attributes
 Create new InfoPath, File Watcher, Microsoft SharePoint, List, and BAM workflows
 Publish a workflow
 Associate a workflow with Microsoft SharePoint, BAM, File Watcher, InfoPath, and
Enterprise Console Lists


Disable or delete a workflow
Manage security settings C
Organize workflow items by grouping them into folders
Manage the version changes to a workflow

Workflow Management allows you to create a list and store the data inside the list. You can map
ot
your list to a single table or multiple tables and also map to an existing table or a generic table that
is provided by Workflow Management. You can connect to lists with various APIs from an external
environment, and associate various events to workflow activities.
A list in Workflow Management generates the form automatically where the form works like the
interface. User Form information is stored in the database with the help of this list.
There are two types of Lists in Workflow Management:
N

 Generic List: Data entered in Generic Lists; stored in a Repository table called
SKEListItemDataNV. All data entered in generic lists is stored in the table without any
user-defined column names. Data is stored in the table using the datatype for that column.
 Existing Table: Unlike the generic table, the existing table is used to store list data in a
user-defined table with preferred column names you define.
o

List Table
The List Table control is used to select a table for storing list data. The available tables are:
D

 Generic Table
 Existing Table
On the Select Table screen, select the Existing Table option. This option allows you to create an
existing table list. This option works with a script that is provided by Workflow Management and is
run in the repository database. You can add customized columns to this script. See Lab 15 for
steps to use this script to configure an existing table.

Workflow Management 2019


5-30 Module 5 – Lists

y
op
C
ot
N
o
D

Wonderware Training
Lab 15 – Creating an Existing Table List 5-31

Lab 15 – Creating an Existing Table List

Introduction
In this lab, you will create an existing table list for equipment maintenance. With the generic table,
all the list data is maintained in a single database table with generic column headings. With an
existing table, you can generate separate custom tables with customized column headings for
your list data. Existing table lists maintain information in a database using a SQL script. You will
update the list you created in the last lab by adding one more column and generating a form from

y
the list and adding list items.

Objectives

op
Upon completion of this lab, you will be able to:
 Create a Workflow Management list using an Existing Table list option
 Update a list

C
ot
N
o
D

Workflow Management 2019


5-32 Module 5 – Lists

Create an Existing Table


First, you will create an existing table.
1. Ensure you are logged into Enterprise Console as the admin user.
2. In the hamburger menu in the left pane, click Tools | Manage List.
The Manage List window appears

3. Click New , and then on the toolbar that appears, click List .

y
The New List window appears.
4. In the Title field, enter Equipment MaintenanceEx.
5. In the Description field, enter Equipment Maintenance Existing Table List.

op
6. For Enable Folder Support?, leave the default Yes option.

C
ot
N

7. Click Save & Continue.


The Create List - Select Table window appears.
o
D

Wonderware Training
Lab 15 – Creating an Existing Table List 5-33

8. In Option 2, click the Existing Table option.

y
op
C
This option allows you to create an existing table list. This option works with a script that is
provided by Workflow Management and is run in the repository database. You can add
customized columns to this script.
9. To see the script, in Option 2, click Read More.
ot
The Skelta List table script window appears with a sample script. Workflow Management
uses this sample script to understand your table. You will replace the placeholders, indicated
by <>, with your required information.
N
o
D

Workflow Management 2019


5-34 Module 5 – Lists

10. Click in the script and, on the keyboard, press Ctrl+A to select all the text.
11. Copy the text, and then close the script window.
12. Switch to SQL Server Management Studio.
It should still be open from the last lab. If you need to log in, see Lab 14, Steps 66 to 69 for
instructions.
13. In the Object Explorer ensure Databases and your repository database named
RepoTrainingDB are expanded.
14. Click RepoTrainingDB, and then on the toolbar at the top of the window, click the New Query

y
button.
A blank query appears in the right pane.

op
15. At the top-left of the window, in the database drop-down list, ensure your database repository
is selected.
16. In the blank query in the right pane, paste the script you copied earlier.

C
ot
N
o
D

Wonderware Training
Lab 15 – Creating an Existing Table List 5-35

17. At the top of the script, select the <NewTableName> placeholder.


18. With the placeholder selected, on the keyboard, press Ctrl+H.
A Find and Replace dialog box appears with <NewTableName> in the Find what field.

Note: If the placeholder is contained within square brackets [<NewTableName>], delete the
square brackets.

y
op
20. Click the Replace All button. C
19. In the Replace with field, enter tblEquipmentMaintenance.

A message appears that nine occurrences were replaced.


ot
N
o
D

21. Click OK, and then close the Find and Replace dialog box.

Workflow Management 2019


5-36 Module 5 – Lists

22. In File Explorer, navigate to C:\Training\Scripts and open LAB-15 Example Script.
23. Copy the text under Script 1.

[EquipmentNumber] [int] NULL,


[ProblemArea] [nvarchar](150) NULL,
[ComponentType] [nvarchar](50) NULL,
[ComponentSize] [nvarchar](50) NULL,
[RepairCost] [int] NULL,
[NumberOfUnits] [int] NULL,
[Total] [int] NULL,

y
[ApprovedBy] [nvarchar](250) NULL,
[ApprovedOn] [nvarchar](50) NULL,

op
C
24. In SQL Server Management Studio, scroll down in the script to [SecurityCustomizationID]
[uniqueidentifier] NULL and add a line and paste the text you copied.
ot
Some of the advantages of existing tables are that you can use your own table columns and
table name. The columns are identified in the script you pasted.
N
o
D

Wonderware Training
Lab 15 – Creating an Existing Table List 5-37

25. Deselect any selected text in the script, and on the toolbar above the script, click the Execute
button.

y
op
The script will be run for your RepoTrainingDB and a message will appear at the bottom of
the window that the query was successful. The table is now available in the repository
database.

C
ot
26. To see the table you created, in the Object Explorer toolbar, click the Refresh button.
N
o

27. In ReproTrainingDB, expand Tables.


D

Workflow Management 2019


5-38 Module 5 – Lists

28. Scroll down to dbo.tblEquipmentMaintenance.


29. Right-click the entry and select Edit Top 200 Rows.

y
op
C
The table opens in the right pane. There are no records because you just created the table,
but scroll to the right and note the column headings.
ot
N
o
D

Wonderware Training
Lab 15 – Creating an Existing Table List 5-39

30. Switch back to the Enterprise Console to the Create List - Select Table window.
31. In Option 2, to the right of Select Table, click the Refresh button.
The tblEquipmentMaintenance table appears in the Select Table area.
32. Select the table.

y
op
C
ot
33. Click Next.
N
o
D

Workflow Management 2019


5-40 Module 5 – Lists

The List Designer appears with the title and description of your table list. Also, based on the
column data types in your script, it automatically populated the list with the records. You do not
have to drag and drop like you did for the generic table list.

y
op
C
ot
34. Click Submit to generate a form.
A message appears with an option to edit the auto-generated form.
N

35. Click OK.


o

A message appears confirming that the list is successfully saved and a form associated with
the list is generated.
D

36. Click OK.

Wonderware Training
Lab 15 – Creating an Existing Table List 5-41

The Forms Designer page appears with the generated form.

y
op
C
Now, you will change the control type for only one control to show what happens when you
regenerate a form later. You will make the change to the ComponentSize control.
ot
37. Hover over ComponentSize and on the toolbar that appears, click the Replace button.
38. In the Replacement Control drop-down list, select Drop-Down, and then click Apply.
N
o
D

Workflow Management 2019


5-42 Module 5 – Lists

39. Open the Properties for ComponentSize.

40. Under Options, click the Add Record button.


41. In the Text field, enter Small.
42. In the Value field, enter Small.
43. Add the other ComponentSize options as follows:

Text Value
Medium Medium

y
Large Large

op
C
ot
N

44. Click Apply.


The form reappears with the drop-down control added.
o

45. Publish the form.


A message appears confirming that the item was published successfully.
D

46. Click Close.

Wonderware Training
Lab 15 – Creating an Existing Table List 5-43

47. Preview the form.


Note the ComponentSize control has been changed to a drop-down list.

y
op
C
48. Close the preview, and then close the form.
Now that you have run the script and worked on the list-generated form, you will make a change to
ot
the script in SQL Server Management Studio.

49. In SQL Server Management Studio, on the toolbar, click the New Query button.
A blank query appears in the right pane.
50. In LAB-15 Example Script, copy the text under Script 2.
N

ALTER TABLE tblEquipmentMaintenance ALTER COLUMN ApprovedOn datetime NULL


o

51. In SQL Server Management Studio, paste the script.


52. On the toolbar above the script, click the Execute button.
D

Workflow Management 2019


5-44 Module 5 – Lists

The script will be run to alter the field in tblEquipmentMaintenance and a message appears
at the bottom of the window that the query was successful.

y
op
53. To check if the change was made, in Object Explorer, right-click
dbo.tblEquipmentMaintenance and select Design.

C
ot
N

The table opens in the right pane in design mode.


54. In the top pane, confirm that ApprovedOn has been changed to the datetime data type.
o
D

Wonderware Training
Lab 15 – Creating an Existing Table List 5-45

55. Switch back to the Enterprise Console and ensure you are logged in as the admin user.
56. If the Manage List window is not displayed, in the hamburger menu, click Tools | Manage
List.
The Manage List window appears.
57. Select Equipment MaintenanceEx and on the toolbar at the top-right of the list, click the Edit
button.

y
op
C
58. In the Edit List window, click Save & Continue.
The List Designer window appears with the Equipment MaintenanceEx table list.
ot
N
o
D

59. Scroll down to ApprovedOn and use the Delete button on the toolbar to delete the control.
This is a TextInput control and it should be a DateInput control.

Workflow Management 2019


5-46 Module 5 – Lists

60. Click Yes in the dialog box that appears.

y
op
61. Drag a DateInput control to the orange area.

C
62. In the Tag name field, enter ApprovedOn and press the Tab key to add the Mapped XML
Node.
ot
63. In the Bound to DB Column, enter ApprovedOn.
N
o
D

Wonderware Training
Lab 15 – Creating an Existing Table List 5-47

64. Click Save.


65. In the table list, click Submit.
The Form Settings dialog box appears with a message that the list is successfully saved.
66. Choose the option to regenerate the form.

y
op
67. Click OK.
The form is regenerated. The previous change you made to ComponentSize to make it a
drop-down list has been overwritten and ApprovedOn is now a DateInput control.
Next, you will add some options to three controls. First, you will add options to the ProblemArea
control.

control.
C
68. On the ProblemArea toolbar, use the Replace button to make the control a check box

69. Use the Properties to add records for the check box options as follows:
ot
Text Value
Line1 Line1
Line2 Line2
Line3 Line3
Line4 Line4
Line5 Line5
N

Next, you will add options to the ComponentType control.

70. On the ComponentType toolbar, use the Replace button to make the control a radio
button control.
71. Use the Properties to add records for the radio button options as follows:
o

Text Value
Filter Filter
D

Fan Fan
Compressor Compressor

Next, you will add options to the ComponentSize control because the options you added earlier
were overwritten when you regenerated the form.

72. On the ComponentSize toolbar, use the Replace button to make the control a drop-down
control.

Workflow Management 2019


5-48 Module 5 – Lists

73. Use the Properties to add records for the radio button options as follows:

Text Value
Small Small
Medium Medium
Large Large

Now, you will hide the Title control because you do not need it in this form.
74. Open the Properties for Title.

y
75. In the Default Value field, enter N/A.
76. On the Appearance tab, for the Visible option, click No.

op
77. Click Apply.
78. Publish the form.
A message appears confirming that the item was published successfully.
79. Click Close.
80. Preview the form and check all the areas you changed.
81. Close the preview.
82. Close the form.

83. In the hamburger menu, click Lists


the submenu.
C
and notice that the second table has been added to

84. Click the second table, which is Equipment MaintenanceEx.


ot
N
o
D

Wonderware Training
Lab 15 – Creating an Existing Table List 5-49

The Equipment MaintenanceEx window appears.

85. Click New , and then on the toolbar that appears, click List Item .
The New Item window appears with your form.
86. In the Equipment Number field, enter 1001.
87. For Problem Area, check Line1 and Line3.
88. For Component Type, click Filter.
89. In the Component Size drop-down list, select Medium.

y
90. In the Repair Cost field, enter 20.
91. In the Number of Units field, enter 2.

op
92. In the Total field, enter 40.
93. In the Approved By field, enter Lenny.
94. In the Approved On field, select any date.

C
ot
N
o

95. Click Finish.


The list appears in the window. Your changes are maintained in the database.
D

Workflow Management 2019


5-50 Module 5 – Lists

96. Repeat Steps 85 to 95 to create the following list items.

Equipment Problem Component Component Repair Number Approved Approved


Total
Number Area Type Size Cost of Units By On
1002 Line1 Filter Medium 15 2 30 Lenny (any date)
Line2
1003 Line3 Filter Large 100 2 200 Garry (any date)
Line4
1004 Line4 Filter Large 150 3 450 Harry (any date)

y
Line5
1005 Line1 Fan Medium 100 4 400 Jimmy (any date)
Line3

op
1006 Line3 Compressor Medium 200 2 400 Garry (any date)

Now, you will check the table in the database for the records you added.
97. In LAB-15 Example Script, copy the text under Script 3.
select * from tblEquipmentMaintenance

98. Switch to SQL Server Management Studio.


C
99. Click the query tab and paste the text you copied under the first line.
ot

100.Press Enter, and then select the text you added.


N

101.Click the Execute button.


o
D

Wonderware Training
Lab 15 – Creating an Existing Table List 5-51

All the records you entered appear in the bottom pane.

y
op
C
102.Scroll to the right and check the column names and data.
ot
N
o
D

Workflow Management 2019


5-52 Module 5 – Lists

y
op
C
ot
N
o
D

Wonderware Training
Section 3 – Workflow Management Lookup 5-53

Section 3 – Workflow Management Lookup


This section explains the lookup types in Workflow Management: Data Lookup, Role Lookup, and
User Lookup. It describes how to set up a Data Lookup and use lookup as a drop-down list.

Workflow Management Lookup


Lookup is a feature in Workflow Management that allows you to fetch data from a SQL Database,
List, or Microsoft SharePoint List. Lookup Settings is a separate module that allows you to create

y
lookups and maintain it as a Lookup List.
The Data source for a lookup can be a Database, List, or Microsoft SharePoint List. Databases are
used to populate lookup data from a database and Lists are used to populate data from an existing

op
List. When you create a List or Form, the Lookup Input control can be easily linked to the desired
lookup from the Lookup list.
The lookup types are:
 Data Lookup: Search for data from a data source in your form
 Role Lookup: Search for roles, in the providers mapped to the repository, in your form
 User Lookup: Search for users, in the providers mapped to the repository, in your form

Data Lookup

C
You use the Data Lookup control to search for data from a data source in your form.

Properties
ot
The properties for the control are grouped under the following tabs.
Basic

Property Description
Name Name that identifies the control. This value is also used for the label of the
control.
N

XML Node XML node mapped to the control. Use this value to map a list to a form and a
form to a workflow.
 Prefix with @ to use the value of the control as an attribute with the
immediate parent node. For example, @FirstName.
 Use / for a parent-child node configuration to uniquely identify a control in
a form with multiple containers. For example, Employee/FirstName.
o

The default value is the value for the Name property without the spaces.
Note: If you use / to denote a parent that is not a container and the parent
is at the same level as that of the child, the XML node for the control is not
generated. If you edit this value later, it might affect the mapping between
D

forms, lists, and workflows.


Description Description for the control.
Tooltip Message that appears when the pointer hovers over the control.

Workflow Management 2019


5-54 Module 5 – Lists

Property Description
Lookup Source Name of the item in the Lookup List.
To add the name of the item in the Lookup List for the control, click the
Lookup Source button. The Lookup Source Configuration page appears. In
the Data Source Type list, click a data source type. In the Data Source box,
click a data source. In the Parameters list, click and select a control on the
form, if applicable. Click Save & Continue. The selected name is set for the
control and the Lookup Source Configuration page is closed.
Note: For Parameters, the Title of the control on the form is displayed, if set
for the control. Otherwise, the XML Node of the control on the form is

y
displayed. For information about Lookup List, see List Lookups.

Appearance

op
Property Description
Enable Enable or disable the control.
 Select Yes to enable the control.
 Select No to disable the control.

The default value is Yes.


Visible Show or hide the control.

Read-Only C
 Select Yes to show the control.
 Select No to hide the control.

The default value is Yes.


Allow or deny a user to enter a value for the control.
 Select Yes to deny a user to enter a value for the control.
 Select No to allow a user to enter a value for the control.
ot
The default value is No.
Label Position Position of the label for the control.
 Select Default to allow the system to align the label. The system aligns
the label to the left of the control or as specified by the container control.
 Select Left to align the label to the left of the control.
N

 Select Top to align the label to the top of the control.


 Select Right to align the label to the right of the control.
 Select Bottom to align the label to the bottom of the control.
 Select Suppress to hide the label for the control.

The default value is Suppress.


Note: If the value is Default and the control is placed on a container control,
o

the value of the Label Position property of the container control determines
the position of the label for the control.For example, if the value is Default and
the control is placed on a Base Form with Label Position property set to Top,
the label is aligned to the top of the control.
D

Label-Control Area Area occupied by the label and the control in percentage.
 Select Default to allow the system to set the label and the control areas.
 Select Custom to specify the label area. The control area is automatically
set based on the label area.
The default value is Default.
Note: If the value is Default and the control is placed on a container control,
the value of the Label-Control Area property of the container control
determines the area of the label for the control. This is applicable only when
the Label Position is set to Left or Right.

Wonderware Training
Section 3 – Workflow Management Lookup 5-55

Property Description
Watermark Hint text that appears when no value is entered for the control.
Width Width in pixels for the control.
The default value is 0.
Note: If the value is 0, the width of the control is set as per the default values.
Height Height in pixels for the control.
The default value is 0.
Note: If the value is 0, the height of the control is set as per the default values.

y
Retain Space Reserve or remove space when the control is hidden.
 Select Yes to keep space when the control is hidden.
 Select No to remove space when the control is hidden.

op
The default value is No.
Show as Drop-Down Enable or disable the control to show as Drop-Down.
 Select Yes to enable the control to show as Drop-Down.
 Select No to disable the control to show as Drop-Down.

The default value is No.


Note: If you select Yes, a user will not be able to type in the control at
runtime.
Drop-Down Height

Adapt UI
C
Drop-down height in pixels for the control.
The default value is 300.
Note: If the value is 0, the drop-down height of the control is set as per the
default values.
Change the user interface of the control based on the display width.
ot
 Select Yes to allow the system to change the user interface of the control
based on the display width. The Web View is rendered for the control
when the screen width is greater than or equal to 800 pixels. Otherwise,
the Mobile View is rendered for the control.
 Select No to deny the system to change the user interface of the control
based on the display width. In this case, the Web View is rendered for the
control.
N

The default value is Yes.


Note: The responsiveness of the container depends on the value set for
the Desktop View Only property at the Form level.
Custom Style Sheet Prefix for the CSS class name in the custom style sheet.
Identifier
For information about using custom style sheets, see Custom Styles.
o

Note: The value must start with a letter in the alphabet and can contain only
alphanumeric characters.
D

Workflow Management 2019


5-56 Module 5 – Lists

Validation

Property Description
Mandatory Enforce or bypass entering a value for the control.
 Select Yes to enforce entering a value for the control.
 Select No to bypass entering a value for the control.

The default value is No.


Note: If you configure a Data Lookup control as mandatory, when you
select an item from the drop-down, the mandatory message appears. The
message disappears after you have selected an item.

y
Autocomplete Length Number of characters to start autocomplete.
The default value is 3.

op
Note: If the value is 0, the autocomplete length for the control is set as per the
default values.
Show Confirmation Show or hide the confirmation message for clearing the value of the control in
Message devices.
 Select Yes to show the confirmation message for the control.
 Select No to hide the confirmation message for the control.

The default value is Yes.

Advanced
C
Confirmation Message Text Confirmation message for clearing the value of the control in devices.
The default value is Are you sure you want to clear the value?
Note: This property is applicable only when the Show Confirmation Message
property is set to Yes.
ot
Property Description
On Data Change Run a script when value of the control changes.
For more information, see scripting guidelines for On Data Change property.
ID Reference identification code for the control. This value is automatically
generated and cannot be changed.
N

Default Number of Records Number of records added at runtime for the control.
The default value is 50.
Note: If the value is 0, the default number of records for the control is set as
per the default values.
Retain Selected Value Keep or lose the selected value for the control when the current parameter
values from the source are changed.
o

 Select Yes to keep the selected value for the control.


 Select No to lose the selected value for the control.

The default value is No.


D

Resolve Value in Edit Mode When the Form is in the edit mode like opening a Form from a WorkItem in
Inbox, update or keep the Lookup display value and the extended information
(if the property Extended Information is Yes) based on the selection for the
control.
 Select Yes to update the Lookup Display Value and the Extended
Information.
 Select No to keep the existing Lookup Display Value and the Extended
Information.
The default value is No for performance improvement.

Wonderware Training
Section 3 – Workflow Management Lookup 5-57

Property Description
Persist Display Value Keep or lose the display value for the control on submission of the form.
 Select Yes to keep the display value for the control.
 Select No to lose the display value for the control.

The default value is Yes.


Extended Information Allow or deny a user to access the extended information (that is columns
other than the display and value columns of the result set) based on the
selection for the control.
 Select Yes to allow a user to access the extended information based on

y
the selection for the control.
 Select No to deny a user to access the extended information based on
the selection for the control.
The default value is No.

op
Include in Summary Allow or deny a user to view the value in the Summary of a Base Form.
 Select Yes to allow a user to view the value in the Summary of a Base
Form.
 Select No to deny a user to view the value in the Summary of a Base
Form.
The default value is No.

Scripts
C
Note: This property is applicable only when the control is used on a Base
Form with Repeating property set to True, and the form is viewed on a
small form factor mobile device. For information about Summary of a
Base Form, see Base Form.
ot
For information about using scripts, see scripting guidelines for Data Lookup control.

Role Lookup
You use the Role Lookup control to search for roles, in the providers mapped to the repository, in
your form. The tabs in the Role Lookup are similar to those in Data Lookup, but there are some
N

differences in the types of tabs. See Role Lookup for detailed information.

User Lookup
You use the User Lookup control to search for users, in the providers mapped to the repository, in
your form. The tabs in the Role Lookup are similar to those in Data Lookup, but there are some
differences in the types of tabs. See User Lookup for detailed information.
o

Show as Drop-Down Enable or disable the control to show as Drop-Down.


 Select Yes to enable the control to show as Drop-Down.
D

 Select No to disable the control to show as Drop-Down.

The default value is No.


Note: If you select Yes, a user will not be able to type in the control at
runtime.
Drop-Down Height Drop-down height in pixels for the control.
The default value is 300.
Note: If the value is 0, the drop-down height of the control is set as per the
default values.

Workflow Management 2019


5-58 Module 5 – Lists

y
op
C
ot
N
o
D

Wonderware Training
Lab 16 – Reading Data Using a Workflow Management Lookup 5-59

Lab 16 – Reading Data Using a Workflow


Management Lookup

Introduction
In this lab, you will use database lookup in a form. You use the lookup feature to search for
information from some other source, such as a database, Web API, or list. You will search for a
ComponentType. You will create a database connection, and then use the lookup with the

y
database connection. You can use this lookup result as a parameter to show all related records in
a form.

op
Objectives
Upon completion of this lab, you will be able to:
 Configure a Workflow Management Lookup
 Read the database data into a lookup

C
ot
N
o
D

Workflow Management 2019


5-60 Module 5 – Lists

Create a Form and Add Lookup Controls


First, you will create a form, which you will use for your database lookup.
1. Ensure you are logged into Enterprise Console as the admin user.
2. On the Forms page, create a new form as follows:

Name: Lab16
Description: Reading Data Using a Workflow Management Lookup

y
op
C
ot
The Forms Designer page appears with the generated form.
N
o
D

Wonderware Training
Lab 16 – Reading Data Using a Workflow Management Lookup 5-61

The lookup controls are User Lookup, Role LookUp, and Data Lookup. User Lookup and
Role LookUp are related to your provider and searches for the information from that provider.
For example, if your provider is Active Directory, User Lookup will search for a user in Active
Directory and Role LookUp will search for a role in Active Directory. You are using the
repository database, so these lookup controls will search in the repository database table.
Data Lookup can search in any SQL database.
Now, you will add the Data Lookup control to the form. You will use the existing table you created
in the last lab.
3. Drag one Data Lookup control to the right pane.

y
The control will be automatically placed.
4. Double-click the default name and enter Search Component Type.

op
5. Open the Properties for the control.

C
Notice the Lookup Source field. You will have to configure a lookup source, which requires a
connection string from any source.
ot
N
o
D

6. Click Cancel.

Workflow Management 2019


5-62 Module 5 – Lists

Create a Database Connection


Next, you will create a database connection and link the lookup with the database.
7. In SQL Server Management Studio, on the query tab, add the following text under the last line:

select distinct ComponentType from tblEquipmentMaintenance


8. Select the text and click Execute.
Note the results in the bottom pane.

y
op
C
ot
9. Switch to the Enterprise Console, and then in the hamburger menu, click Settings |
Database Connections.
N
o
D

Wonderware Training
Lab 16 – Reading Data Using a Workflow Management Lookup 5-63

The Connection List page appears with the InBuild connection for your repository database
listed. Workflow Management automatically creates a connection string for your repository
database, which it uses internally.

y
10. In the hamburger menu, click Settings | Lookup Settings.

op
C
ot
N

11. Click New .


A toolbar appears with the lookups available.
o

12. Click the Database lookup.


D

Workflow Management 2019


5-64 Module 5 – Lists

The New Database Lookup window appears.


13. Enter the following information:

Title: SearchComponent
Description: Search Component Lookup

14. For the Command Type field, leave the default Query.

y
op
C
ot
15. Click Continue.
N
o
D

Wonderware Training
Lab 16 – Reading Data Using a Workflow Management Lookup 5-65

In the next screen that appears, note the Title, Description, and Database Connection
fields. The Database Connection field displays the connection string that Workflow
Management automatically creates for your repository database
16. In the Query field, enter the following:
select distinct ComponentType from tblEquipmentMaintenance
If your query contained parameters, you could click the Load Parameters button. You will not
do that now because you do not have any parameters, but this topic will be covered later.

y
op
C
For the Value field, the system will search for the information you enter. You will specify the result
to be returned. Note the explanation of the format to enter in this field. For example, you must
enter TableName.ColumnName. Multiple values can be returned in the Values column, but you
ot
must separate each with a comma. Your query only contains one column, so you will only enter
one.
17. In the Value field, enter tblEquipmentMaintenance.ComponentType.
18. In the Display Name field, enter ComponentType.
N
o
D

19. Click Validate & View.

Workflow Management 2019


5-66 Module 5 – Lists

A preview window appears.


20. Double-click each component type in the top pane, and note the Display Name and Value in
the bottom pane.

y
op
21. Close the preview window.
C
22. Click Save in the New Database Lookup window.
The new lookup is added to the Lookup List.
ot
N

23. Switch back to Forms Designer.


24. Open the Properties for the Search Component Type control.
o

25. In the Lookup Source field, click to the right of the field.
D

Wonderware Training
Lab 16 – Reading Data Using a Workflow Management Lookup 5-67

26. In the Lookup Source Configuration window, in the Data Source Type drop-down list, select
Database Lookup.
27. In the Data Source drop-down list, select SearchComponent.

y
op
28. Click Save & Continue.
The Name and XML Node fields are populated.

C
ot
N

29. Click Apply.


o
D

Workflow Management 2019


5-68 Module 5 – Lists

Test the Lookup


Now, you will test searching for component types.
30. Preview the form.
31. In the Search Component Type field, start to enter Compressor.
Note that as soon as you enter three characters, the component name appears in the drop-
down list.

y
op
32. Select Compressor.
33. Click the x to the right of the field to clear the field, and then start to enter Filter.
Note the same result. This action is because the field is configured to show the component

C
type names that start with the first three characters you entered.
You can configure the field for a different number of characters.
34. Close the preview.
35. Open the Properties for the Search Component Type control.
ot
36. On the Validation tab, in the Autocomplete Length field, click the down arrow to change
it to 2.
N
o
D

37. Click Apply, and then preview the form.

Wonderware Training
Lab 16 – Reading Data Using a Workflow Management Lookup 5-69

38. In the Search Component Type field, start to enter Filter.


Note that now, as soon as you enter two characters, the component name appears in the
drop-down list.

y
39. Test it with Fan.

op
40. Close the preview.
41. Publish the form and close it.

C
ot
N
o
D

Workflow Management 2019


5-70 Module 5 – Lists

y
op
C
ot
N
o
D

Wonderware Training
y
op
C
Module 6 – Database Operations
Section 1 – Reading Data from a Database 6-3
ot
Lab 17 – Using the Database Activity 6-7
Section 2 – Workflow Management Log 6-23
Lab 18 – Adding Information into a Workflow Management Log 6-25
N
o
D
6-2 Module 6 – Database Operations

Module Objectives
 Configure connection settings
 Configure the Database activity
 Explain Workflow Management logs
 Insert database results in log files

y
op
C
ot
N
o
D

Wonderware Training
Section 1 – Reading Data from a Database 6-3

Section 1 – Reading Data from a Database


This section describes how to create a variable to read/hold database data, set up a connection
string to communicate with a SQL server database, and configure the Database activity. It also
discusses how to use the Query procedure mode to run a database command in the Database
activity and explains how to read XML data fetched from a database.

Create a Variable

y
See Module 4, Section 6 for information on how to create a variable to read/hold database data.

Provide a Connection String for a Database

op
To connect to the existing Farm database, use the Connect to existing database window in the
Farm Configuration wizard. To connect to the Repository DataSource database, use the Manage
DataSource window on the Central Configuration page.

Connecting to an Existing Farm Database

C
You can use the Connect to existing database dialog box to connect to the existing Farm. You can
select the Connection String or Connection provider for the new database.
In the Server Name field, select the computer on which the Farm Database is installed. Select
Connection String and enter the following details:
 Authentication Type: Provide information on the process used to validate a user.
Workflow Management solution supports both Windows and SQL server authentication.
ot
 User ID: Enter the SQL user ID for a SQL Server type of authentication. For Windows
Authentication, this field appears disabled.
 Password: Enter the SQL password for a SQL Server type of authentication. For
Windows Authentication, this field appears disabled.
 Advanced Settings (Optional): Use to enter any additional connection information, such
N

as connection Timeout. Example: Connection Timeout = 20.


See http://sun.skelta.com/#connectingtoanexistingskeltafarmdatabase12_6 for details.

Creating a Repository DataSource


A Repository DataSource is used to store all repository-related data. The Repository DataSource
o

must be created on a machine where the Central Configuration site is installed. A Repository
contains workflow definitions, queues, calendars, workflow execution data, and BAM data. The
User Provider for the repository is also defined while creating the repository.
D

To create a Repository DataSource, on the Windows Start menu, select Programs, Wonderware,
Workflow Management, and then right-click Central Configuration and select Run as administrator.
The Central Configuration web page appears. Click DataSource Settings. The Datasource List
page appears. Click Add. The Manage Datasource page appears.

Workflow Management 2019


6-4 Module 6 – Database Operations

Enter the required details:


 Name: Enter a valid data source name. Example: TelematicsDataSource.
 Description: Enter a description for the data source. Example: This data source is used to
store connection details.
 Connection String: Select this option to establish a connection with the database. The
connection string contains fields that define the connection. The connection information is
encrypted and stored.
In the Server Name field, click the Refresh button to list the active database servers in a
network. Select the required database server in the drop-down list. To use a database on

y
the local machine, enter "localhost", ".", or the local computer’s name for the Server
Name. See http://sun.skelta.com/#creatingrepositorydatasource_4 for other options. If the
required server name does not get populated when you click the Refresh button, manually
enter the name of the server in the Server Name field.

op
Use the Authentication Type field to determine the process to validate a user who is trying
to connect to the database. Workflow Management uses Windows and SQL Server
authentication. SQL Server authentication requires a user ID and password already
defined in the SQL Server database. The User ID and Password fields are disabled if
Windows Authentication is selected.
Use the Advanced Settings field to define advanced connection settings like providing the


C
time (in seconds) that a connection string must wait to connect to the database server
before terminating the connection. Example: Connection Timeout = 20. Use this field to
also define maximum connections that can be opened in a connection pool. Example: Max
connection pool = 250. The default connection pool is set as 250. Enter a higher value in a
heavily loaded environment.
Connection Provider: Provide connection-related information from a Dynamic Link
ot
Library (dll). Connection-related details are encrypted and stored in the library.
Click Test Connection to ensure database connectivity. A message about successful test
connection appears. If SQL authentication is used, you must enter the password again after
clicking Test Connection, and before clicking OK. Click OK. A message about successful creation
of the data source in the Workflow Management Farm appears.The message also states that the
required tables will be created in the data source after a repository is associated with the data
N

source.
When a data source is saved, an entry is created for the data source in the Farm Database. When
a first repository is created for the data source, Workflow Management tables are added to the
data source. While creating a data source, the archival database is created with the same
database name suffixed by _BI. This database is used for archival in future use.
o

Configure the Database Activity


The Database Activity allows you to run queries, stored procedures, and functions from the
D

workflow. The Database Activity establishes connection with the database server and retrieves or
updates data in the database. The activity gets the schema of the database table to an XML
variable according to the query, stored procedures, or functions passed.
In the Activity Properties pane, use the properties under Configuration to configure the
functionality of the activity.

Wonderware Training
Section 1 – Reading Data from a Database 6-5

The Database Connection property is used to get the connection to the database server. You can
use this property to select the database connection, which has been configured in Enterprise
Console\Settings\Database Connections.

y
op
The Query Builder is used to create a query. To enter the query, click the Query Builder property to
open the property window.

C
ot
N
o
D

Workflow Management 2019


6-6 Module 6 – Database Operations

Note the different options in the image below.

y
op
The command types that can be selected are:
 Query
C
ot
 Stored Procedure
 Functions
See http://sun.skelta.com/#databaseactivity_2 for more information.

Application Scenario
N

Consider a scenario where a manager wants to send approval forms to employees. The manager
can add the database activity with a query to select the email address column from the Employee
Database. The Output XML will have the schema based on the query and this XML variable can
be used to assign employees to whom the approval forms will be sent. When the workflow is
initiated, the query in the database activity will be run and all the employees will receive the
approval form in their Inboxes.
o
D

Wonderware Training
Lab 17 – Using the Database Activity 6-7

Lab 17 – Using the Database Activity

Introduction
In this lab, you will use a Database activity to run a query in a different SQL Server database than
the repository database. A SQL Server Database named TestDB is provided in your machine. You
will insert data into a table named MaintenanceLog, which is available under the TestDB database.
You will take the XML data from the second Invoke Form activity in the exported Lab13 workflow
and insert it into the database. You will then use the lookup control to retrieve the data from the

y
database.

Objectives

op
Upon completion of this lab, you will be able to:
 Set up a connection string to communicate with a SQL server database
 Define the database Query in the Database activity
 Use a stored procedure with a Database activity
 Read XML data using a Workflow Management variable

C
ot
N
o
D

Workflow Management 2019


6-8 Module 6 – Database Operations

Export and Import a Workflow


First, you will export the Lab13 workflow, so that you can use it as a base for the workflow you will
create. Then, you will create a new workflow and import the exported Lab13 workflow.
1. Ensure you are logged into Enterprise Console as the admin user.
2. Export the Lab13 workflow to the C:\Training folder.
3. On the Workflows page, create and save a new standard workflow with the following title and
description:
:

y
Title: Lab17
Description: Using the Database Activity

op
The Process Designer appears.
C
Note that at the top-right of the window, TrainingRepository / Lab17 / 1 is visible.
ot
4. Import the Lab13_1.xml file from C:\Training.
N
o
D

Wonderware Training
Lab 17 – Using the Database Activity 6-9

Configure a Workflow
Now, you will modify the Lab13 workflow to update the Information activity named Notify
Operator of Approved. You will also add and configure another Information activity and a
Database activity.
5. In the Activities pane, with Human Activities selected, drag an Information activity to the
design mosaic as shown below.
6. In the Activities drop-down list, select Engine Activities and drag a Database Activity to the
design mosaic as shown below.

y
op
C
Next, use the Activity Properties pane to configure each activity.
ot
7. Modify the Information activity named Notify Operator of Approved as follows:
Information

Name: Notify Operator of Approved (default)


Description: Notification of Approval Data Inserted into DB
N

Assign Actor(s): Joe (Operator 1) (default)

8. Configure the new Information and Database activities as follows:


Information

Name: Notify Supervisor About Back-End Insert Failure


o

Description: Notification of DB Insert Failure


Assign Actor(s): Lenny (Supervisor 1)

Database
D

Name: Database Activity Insert EPI Form Data


Description: Database Insert for MaintenanceLog Table

Workflow Management 2019


6-10 Module 6 – Database Operations

9. Reposition the activities to match the layout below and remove, add, and label the linking lines
as shown below.
Press F5 to refresh the screen if necessary.

y
op
C
ot
Now, you will continue configuring the Database activity. You need a database connection.
10. Select the Database activity named Database Activity Insert EPI Form Data, and in the
Activity Properties pane, for the Database Connection property type, click the drop-down
list to the right of the field.
N

The _sys_repository_connection database string you have used earlier is listed.


o
D

This string points to your repository data only. However, you must now connect from another
database. Therefore, you must create your own connection strings.
11. Close the Lab17 workflow.

Wonderware Training
Lab 17 – Using the Database Activity 6-11

12. In the hamburger menu, click Settings | Database Connections.

y
op
C
The Connection List page appears and lists the connection for your repository database,
which Workflow Management automatically created for that database only. Another database
named TestDB has been provided in your machine. You will create a new connection for the
TestDB database.
ot
13. Click New .
The New Connection dialog box appears.
14. Enter the following information:
N

Title: ConnectTestDB
Description: Connection for TestDB Database
o
D

Workflow Management 2019


6-12 Module 6 – Database Operations

15. Uncheck the Connect to repository datasource check box.


You will not use the repository database. You will use the TestDB database.
Other options appear at the bottom of the form.
16. Leave the default Database Type and Connection Type, and then in the Server Name field,
enter the name of your machine.

You can use the Refresh button to find the name of your machine.

y
op
C
ot
17. Scroll down if necessary and for Authentication Type, leave Windows as the default.

18. To the right of the Database field, click the Refresh button.
The drop-down list will be populated with the available databases.
19. Select TestDB.
N
o
D

Wonderware Training
Lab 17 – Using the Database Activity 6-13

20. Click Test Connection.


A message appears that the test was successful.

21. Close the message.

y
22. Click Save.
The connection is added to the list of connections.

op
Configure Database Connection
Now, you will select the Database activity in the Lab17 workflow.
23. Open the Lab17 workflow.
24. Open the properties for the Database activity named Database Activity Insert EPI Form
Data.

C
25. In the Configuration area, click the Database Connection drop-down list and select
ConnectTestDB.
ot
N

26. Click Save.


You can now write your query.
o

27. Under the Query Builder property, click the gray button to the right of the Enter Query field.
D

Workflow Management 2019


6-14 Module 6 – Database Operations

The Query Builder window appears.


Next, you will build your query.
28. In the Command Type drop-down list, keep the default Query.
29. In File Explorer, navigate to C:\Training\Scripts and open LAB-17 Example Script.
30. Copy the script.

insert into MaintenanceLog (DrumNumber, Speed, IncidentDateTime,


IncidentReason, ActionTaken, ApproverComment, LastApproverName, Email,

y
Department) values(@DrumNumber, @Speed, @IncidentDateTime, @IncidentReason,
@ActionTaken, @ApproverComment, @LastApproverName, @Email, @Department)

op
31. In the Enter Query field, paste the script.

C
Note the column names and the parameters indicated by the @ symbol.
ot
N
o
D

Wonderware Training
Lab 17 – Using the Database Activity 6-15

32. Click Load Parameters to initialize the parameters.


The parameters appear at the bottom of the window.

y
op
C
ot
N
o
D

Workflow Management 2019


6-16 Module 6 – Database Operations

33. Configure the Parameter and Type fields as follows:


Parameter Type
DrumNumber String
Speed lnteger
IncidentDateTime DateTime
IncidentReason String
ActionTaken String
ApproverComment String
LastApproverName String

y
Email String
Department String

op
C
ot
N
o
D

Wonderware Training
Lab 17 – Using the Database Activity 6-17

Now, for the Value field, you will add the XML variable you output in Lab 13.

34. For DrumNumber, open the Expression Editor .


35. In Object Browser in the left pane, expand Workflow Instance and XmlVariables, and note
OutputXmlEPIApproval.
This is the XML variable you output in Lab 13.
36. Expand OutputXmlEPIApproval and SKRootDefinition.
37. Click DrumNumber, and then click in the right pane to paste the variable.

y
38. At the top-right of the window, click the Return Type drop-down list and select System.String.

op
C
ot
N

39. Click OK.


40. Close the Expression Editor.
41. For Speed, repeat Steps 34 to 37, but select Speed.
42. In the Return Type drop-down list, select System.Int32.
43. Click OK.
o

44. Close the Expression Editor.


45. Repeat Steps 34 to 40 to configure the SKRootDefinition and Return Type for the
D

parameters listed as follows:


Parameter Type SKRootDefinition Return Type
IncidentDateTime DateTime IncidentDateandTime System.DateTime
IncidentReason String IncidentReason System.String
ActionTaken String ActionTaken System.String
ApproverComment String Comments System.String

Workflow Management 2019


6-18 Module 6 – Database Operations

46. For LastApproverName, repeat Steps 34 to 37, but expand ApproverArea and
ApproverDetails, and select ApproverName.
47. Click the Return Type drop-down list and select System.String.
48. Click OK.
49. Close the Expression Editor.
50. For Email and Department, repeat Steps 46 to 49.
51. Leave the Output Xml Variable blank.

y
This field is not required.

op
C
ot
N

52. Click Save, and then in the same window, click Close.
The Database Activity Insert EPI Form Data activity has been configured.
o
D

Wonderware Training
Lab 17 – Using the Database Activity 6-19

Publish and Test Run


Now, you will test the updated workflow.
53. Click Publish and Test Run.
The Analyst’s View appears. The Check-List on Spill activity is awaiting approval.

y
op
54. Click the Check-List on Spill activity and note that Joe needs to take action.
55. Close the window.
56. Log in as Joe.

C
57. In the Work items list, click the top item.
The WorkItem Detail View appears with the Check-List items on the right.
58. In the What's the reason for the spill? field, enter Speed.
59. In the Which areas got affected? area, check Conveyor Belt and Floor.
ot
60. In the What’s the estimated size of the spill? drop-down list, select Medium.
N
o
D

61. Click Submit.


62. Use the Reports menu to check the Awaiting status.
The Approve Cleaning Spill is awaiting an action.
63. Click the Approve Cleaning Spill activity and note that Charlee needs to take action.

Workflow Management 2019


6-20 Module 6 – Database Operations

64. Close the window.


65. Log in as Charlee.
66. In the Work items list, click the top item.
67. In the WorkItem Detail View, click Approve.
The task is removed from the Work items list.
68. Log in as the admin user and use the Reports menu to check the Awaiting status.
The Invoke Submittal Form is awaiting approval.

y
69. Click the Invoke Submittal Form activity and note that Joe needs to take action.
70. Close the window.

op
71. Log in as Joe.
72. In the Work items list, click the top item.
The EPI Approval Form appears. This is the form with the hidden areas for this level, which
only the supervisor level will be able to see.
73. In the Drum Number field, enter D135.
74. In the Speed field, enter 900.

C
75. In the Incident Date and Time field, select any date.
12:00 AM will be added to the date automatically.
76. In the Incident Reason drop-down list, select Conveyor Fault.
77. In the Action Taken field, enter Informed the Team.
ot
N
o
D

Wonderware Training
Lab 17 – Using the Database Activity 6-21

78. Click Finish.


The task is removed from the Work items list.
79. Use the Reports menu to check the Awaiting status.
The Invoke Approval Form is awaiting approval.
80. Click the Invoke Approval Form activity and note that Lenny needs to take action.
81. Close the window.
82. Log in as Lenny.

y
83. In the Work items list, click the top item.
The EPI Approval Form appears. Lenny is a supervisor, so the hidden areas are now visible.

op
84. In the Comments field, enter Contact Maintenance Team ASAP.

C
ot
N
o

85. Click Approve.


D

Workflow Management 2019


6-22 Module 6 – Database Operations

86. Use the Reports menu to check the Completed status and confirm that the task has been
sent to the Database activity.
Note that the last Database activity is completed.

y
op
C
ot
Now, you will check the table in the database for the records you added.
87. Switch to SQL Server Management Studio.
88. Expand Databases\TestDB\Tables.
89. Right-click dbo.MaintenanceLog and click Select Top 1000 Rows.
The query appears in the right pane at the top and the records appear in the bottom pane.
N
o
D

90. Scroll to the right and check the column names and data.

Wonderware Training
Section 2 – Workflow Management Log 6-23

Section 2 – Workflow Management Log


This section explains the Workflow Management Logger control. It explains how to use a
Workflow Management Logger activity and describes the Information, Warning, and Exception
messages in a Workflow Management log.

Using Logger Console


In this section, you will see how to view and use the Logger Console that is part of Workflow

y
Management. The Logger Console is a utility that shows a real-time log of events during the
execution of Workflow Management. It is automatically installed when Workflow Management is
installed.

op
Browse to the location of the Logger Console and double-click the Logger Console executable.
This opens the Logger Console log in a new window. You can view the events as they occur when
Workflow Management is running. The Logger Console will display the events using the three
types of log categories to identify the type of information.

Viewing Message Log Files


Two types of log files are created.

. . . \Wonderware\Workflow Management\Logs
C
The first type of log file, for generic log messages, will be created in the following path:

The log files are saved in this folder using the date of logging as the filename with the format
YYYYMMDD (there will be one log file for each day).
ot
The second type of log file is application-specific. It will log messages related to applications.
These log files are created in separate folders corresponding to each application. The folders are
located in the following path:
. . . \Wonderware\Workflow Management\Logs
These log files are saved with names in the format: <application name>_YYYYMMDD.
N

To view the log files:


Browse to the location of the log files using the relevant path: \Logs or \Logs\<application name>,
depending on the type of log file you want to view. Select the log file to view by looking for the date
of logging.
Open the log file in a text editor. It will display all the events of the day using the three types of log
o

categories to identify the type of information.

Log Message Categories


D

The three categories of messages logged in the log files are:


 Information: This type of message is preceded by a lower case (i). It indicates messages
containing general information about the events being logged. Each message of this type
has four parts – the event information, the module generating the event, the machine on
which the event took place, and the date and time of the event.
 Warning: This type of message is preceded by a question mark (?). It indicates messages
containing warning notes to the users about the events being logged. The messages of
this type have a structure similar to the Information messages with the same four parts
mentioned earlier.

Workflow Management 2019


6-24 Module 6 – Database Operations

 Error: This type of message is preceded by an exclamation mark (!). It indicates


messages containing details about errors that occur. The messages of this type have the
four parts found in the other two message categories. In addition, they have the Exception
Stack Trace, which appears before the machine name and date/time. It can be identified
by the keyword Source and it can be used to trace the source of the error.
The LogConfirmation displays confirmation messages and is preceded by the letter c.

y
op
C
ot
N
o
D

Wonderware Training
Lab 18 – Adding Information into a Workflow Management Log 6-25

Lab 18 – Adding Information into a Workflow


Management Log

Introduction
In this lab, you will add a Logger activity to the Lab17 workflow. Data is typically added to logs
automatically. However, if you want to add specific information, you can use the Logger activity. In
Lab 17, you configured the workflow to notify the operator when the database insert was

y
successful and notify the supervisor if the insert failed. In this lab, you will configure the workflow to
add information to the Log folder after the database operation is performed in the Database
activity. You will use this information to track the success of records being added in the

op
MaintenanceLog table, as well as those not being added. You will use two Logger activities to track
success and failure of the Database activity.

Objectives
Upon completion of this lab, you will be able to:
 Use the Workflow Management logger activity to write information into a Workflow


Management log

C
Write a success or failure message in Workflow Management logs after reading data from
a database
ot
N
o
D

Workflow Management 2019


6-26 Module 6 – Database Operations

Export and Import a Workflow


First, you will export the Lab17 workflow, so that you can use it as a base for the workflow you will
create. Then, you will create a new workflow and import the exported Lab17 workflow.
1. Ensure you are logged into Enterprise Console as the admin user.
2. Export the Lab17 workflow to the C:\Training folder.
3. On the Workflows page, create and save a new standard workflow with the following title and
description:
:

y
Title: Lab18
Description: Adding Information into a Workflow Management Log

op
The Process Designer appears.
C
ot
Note that at the top-right of the window, TrainingRepository / Lab18 / 1 is visible.
4. Import the Lab17_1.xml file from C:\Training.
N
o
D

Wonderware Training
Lab 18 – Adding Information into a Workflow Management Log 6-27

Configure a Workflow
Now, you will modify the Lab17 workflow to update an activity and add and configure two Logger
activities.
5. In the workflow, select the Information activity named Notify Supervisor About Back-End
Insert Failure.
6. With the activity selected, in the Activities pane, select Engine Activities, right-click the
Logger activity, and then select Replace selected Activity.

y
op
C
ot
The Notify Supervisor About Back-End Insert Failure activity is replaced with a Logger
activity.
7. Select the Database activity named Database Activity Insert EPI Form Data and its
connecting lines.
N
o
D

Workflow Management 2019


6-28 Module 6 – Database Operations

8. Move the activity and linking lines to the right to make space for another Logger activity, and
adjust other activities and lines as shown below:

y
op
9. In the Activities pane, with Engine Activities selected, drag another Logger activity to the
layout as shown below.

C
ot
N
o

Three categories of messages are logged in the log files:


 Information (i'): Messages with general information about the events being logged. This
D

type has four parts: event information, module generating the event, machine on which the
event took place, and date and time of the event.
 Warning (?): Messages with warning notes about the events being logged. This type has
the same four parts as Information.
 Error (!'): Messages with details about errors. This type has the same four parts as the
other two categories. In addition, it has the Exception Stack Trace, which occurs before
the machine name and date/time. It can be identified by the keyword Source and can be
used to trace the source of the error.

Wonderware Training
Lab 18 – Adding Information into a Workflow Management Log 6-29

Next, use the Activity Properties pane to configure each activity.


10. Modify the Logger activities as follows:
Logger1

Name: Logger DB Insert Failure


Description: Log Database Query Failure for EPI Maintenance Form

Logger2

Name: Logger DB Insert Success

y
Description: Log Database Query Success for EPI Maintenance Form

11. Add and label the linking line as shown below:

op
C
ot
Now, you will continue configuring the Logger activities. You will first create a message for when
the query is successful.
N

12. Select the Logger activity named Logger DB Insert Success.


13. In the Activity Properties pane, Configuration area, for the LogType property type, click the
Select Option drop-down list.
14. Select Information.
o
D

Workflow Management 2019


6-30 Module 6 – Database Operations

A LogMessage property is added below the selection.

y
15. Click Save.

op
16. Under the LogMessage property, click the gray button to the right of the field.
The LogMessage window appears.
17. In the field drop-down list, select XML Variables.
18. In the second drop-down list, select OutputXmlEPIApproval.
19. In the third drop-down list, select DrumNumber.

C
ot
20. Click Append.
The code appears in the body of the message.
N
o
D

Wonderware Training
Lab 18 – Adding Information into a Workflow Management Log 6-31

21. Above the code, enter ###############INSERTED SUCCESSFULLY###############,


as shown below, and press Enter.
22. Before the code, enter Drum Number::.
23. In the line below the code, enter Incident DateTime::.
24. In the third drop-down list, select IncidentDateandTime, and then click Append.
25. In the next line, enter Comments::.
26. In the third drop-down list, select Comments, and then click Append.

y
27. In the next line, enter ###############, as shown below:

op
C
ot
With this format, you can search for a string and get the Drum Number, Incident DateTime,
or Comments.
N

28. Click Update.


When the query is successful, you will be able to see this information in the Logger.
Now, you will create a message for when the query fails.
29. Select the Logger activity named Logger DB Insert Failure.
o

30. In the Activity Properties pane, Configuration area, for the LogType property type, click the
Select Option drop-down list.
31. Select Information.
D

A LogMessage property is added below the selection.


32. Click Save.
33. Under the LogMessage property, click the gray button to the right of the field.

Workflow Management 2019


6-32 Module 6 – Database Operations

34. In the LogMessage window, in the field drop-down list, select XML Variables.
35. In the second drop-down list, select OutputXmlEPIApproval.
36. In the third drop-down list, select DrumNumber, and then click Append.
The code appears in the body of the message.
37. Above the code, enter the following, as shown below.
###############UNSUCCESSFUL QUERY LOG###############
Please check the Query Rules again for Drum Number::

y
38. Below the code, enter ###############, as shown below.

op
C
ot

39. Click Update.


N

When the query fails, you will get this message in the Logger.
40. In the Activity Properties pane, click Save.
Note that you will also use the Information activity named Notify Operator of Approved, but no
additional configuration is necessary. Now, you will test the workflow.
o
D

Wonderware Training
Lab 18 – Adding Information into a Workflow Management Log 6-33

Publish and Test Run


41. Click Publish and Test Run.
The Analyst’s View appears. The Check-List on Spill is awaiting approval.

y
op
42. Click the Check-List on Spill activity and note that Joe needs to take action.
43. Close the window.
44. Log in as Joe.
45. In the Work items list, click the top item.

C
The WorkItem Detail View appears with the Check-List items on the right.
46. In the What's the reason for the spill? field, enter Manual Error.
47. In the Which areas got affected? area, check Conveyor Belt and Floor.
48. In the What’s the estimated size of the spill? drop-down list, select Medium.
ot
N
o
D

49. Click Submit.


50. Use the Reports menu to check the Awaiting status.
The Approve Cleaning Spill is awaiting an action.
51. Click the Approve Cleaning Spill activity and note that Charlee needs to take action.
52. Close the window.

Workflow Management 2019


6-34 Module 6 – Database Operations

53. Log in as Charlee.


54. In the Work items list, click the top item.
55. In the WorkItem Detail View, click Approve.
The task is removed from the Work items list.
56. Log in as the admin user and use the Reports menu to check the Awaiting status.
The Invoke Submittal Form is awaiting approval.
57. Click the Invoke Submittal Form activity and note that Joe needs to take action.

y
58. Close the window.
59. Log in as Joe.

op
60. In the Work items list, click the top item.
The EPI Approval Form appears. This is the form with the hidden areas for this level, which
only the supervisor level will be able to see.
61. In the Drum Number field, enter D5656.
62. In the Speed field, enter 800.
63. In the Incident Date and Time field, select any date.

C
64. In the Incident Reason drop-down list, select Human error.
65. In the Action Taken field, enter Informed the Team.
ot
N
o
D

66. Click Finish.


The task is removed from the Work items list.
67. Use the Reports menu to check the Awaiting status.
The Invoke Approval Form is awaiting approval.
68. Click the Invoke Approval Form activity and note that Lenny needs to take action.
69. Close the window.

Wonderware Training
Lab 18 – Adding Information into a Workflow Management Log 6-35

70. Log in as Lenny.


71. In the Work items list, click the top item.
The EPI Approval Form appears.
72. Scroll down to Comments and enter Act Immediately.

y
op
73. Click Approve.
C
ot
Once Lenny approves, the task will be sent to the Database and the message will be sent to
the success or fail Logger.
N
o
D

Workflow Management 2019


6-36 Module 6 – Database Operations

You can use the System Platform Management Console Log Viewer to view the log files in a
format that is easy to read.
74. Open the System Platform Management Console.
75. Fully expand Log Viewer and click Local.
76. Review the logs.

y
op
77. In the toolbar, click the Find button.
The Find window opens.

C
78. In the field under Message, enter Drum Number.
ot

79. Click Find Next.


N

After a few moments, all the logs with Drum Number appear.
80. Double-click one log and note the details.
o
D

Wonderware Training
y
op
C Module 7 – Reporting
Section 1 – Introduction to Business Activity Monitoring 7-3
ot
Section 2 – Workflow Management Reports 7-5
Section 3 – Introduction to the Process Execution View 7-13
Section 4 – Introduction to Analyze Reports 7-19
N

Lab 19 – Working with Workflow Management Reports 7-21


o
D
7-2 Module 7 – Reporting

Module Objectives
 Explain Workflow Management Business Activity Monitoring
 Explain Workflow Management reports
 Describe the Workflow Management Execution view
 Analyze reports

y
op
C
ot
N
o
D

Wonderware Training
Section 1 – Introduction to Business Activity Monitoring 7-3

Section 1 – Introduction to Business Activity Monitoring


This section introduces the capabilities of Business Activity Monitoring (BAM). It discusses built-in
reports that show, from the Dashboard, the graphics for the workflow statuses and workflow
instances. It describes the Process execution view and the Management window, which show the
activity that contains the live workflow, a report on what happened in the workflow, and the time
duration of activities. It also explains the analysis and alerts per workflow in the BAM
Configuration.

y
BAM Dashboard Views
The BAM Dashboard on the Reports page is a key Workflow Management Server Control. You
can use the BAM feature to monitor the execution of a workflow and get an array of real-time

op
reports. These reports include status and performance of workflows. It is also instrumental in
generating alerts and events.
The BAM Dashboard is an activity monitoring dashboard with two default Dashboard Views:
Workflow Statuses and Workflow Instances. These two views retrieve workflow execution data
dynamically and display the data in the respective charts:
 Workflow Statuses: Shows a bar graph representing the status of workflows being run by
the application.

C
You can see a three-dimensional view of the BAM reports by rotating the axis of the
graphs.
ot
N

Workflow Instances: Shows a bar graph representing the workflow instances being run
o


in the application.
D

Workflow Management 2019


7-4 Module 7 – Reporting

Process Execution View


The Process execution views show the workflow execution status graphically. You can view the
execution view window by double-clicking a top level row in any of the reports. The view
represents the workflow up to the activity or execution status where the view was opened.
The Process execution views are very useful in navigating through large process definitions. You
can click any activity in the view window to open the process definition in the Process Designer, at
that point.
There are three tabs to navigate between the following three views:

y
 Analyst's View
 Progress View
 Execution View

op
See Introduction to the Process Execution View for details.

Analysis and Alerts


The Analyze section of the reports has two sets of reports: Transaction and Execution. The
Analyze section also shows Performance Analysis reports if the performance analysis
configuration has been set for the workflow. It is also instrumental in generating alerts and events,

C
providing reports in graphical format, ensuring secured access, and providing details for tracking
workflows. You can use Process Reports to schedule reports and generate alerts.
ot
N
o
D

Wonderware Training
Section 2 – Workflow Management Reports 7-5

Section 2 – Workflow Management Reports


This section describes the Reports window. It discusses the drop-down list for global reports
versus a workflow report. It explains the default report types. The Dashboard Report shows the
workflow statuses and instances. The Analyze Report shows all transactions and all executions,
and how to access a workflow's Execution view.

Reports

y
The Workflow Management Reports menu displays the BAM control page in the following default
report view. This view displays Global Reports selected in the drop-down list. You can also select
the application name and workflow name in the drop-down list. If no workflow name is set, the
BAM reports are shown for the entire application, covering all the workflows. In the right pane of

op
the Report window are the [+] and [-] symbols to expand and collapse all the nodes respectively.

C
ot
N

Report Type Tree View


o

In the default Report window, the Report Type tree has the following nodes:
 Dashboard: This report type represents the activity monitoring dashboard of the BAM
control. It has two Dashboard Views: Workflow Statuses and Workflow Instances. See
Module 7, Section 1 for details.
D

 Analyze: This report type represents a number of out-of-the-box reports grouped under
Transaction and Execution, each with a set of reports.
The BAM tree by default shows a one-level expanded view instead of a fully expanded tree view.

Workflow Management 2019


7-6 Module 7 – Reporting

Transaction Reports
These reports present workflow execution information related to transactions in the workflow.
There are seven types of reports in this group:
 Activity Details
 WorkItem Details
 Transaction Type Details
 Escalation Report
 My Activities

y
 Activity Time Details
 Activity Performance Details
Activity Details

op
This report presents details related to activity-level transactions.

C
ot
WorkItem Details
This report presents details related to work-item-level transactions.
N
o
D

Wonderware Training
Section 2 – Workflow Management Reports 7-7

Transaction Type Details


This report presents details of different transaction types.

y
op
Escalation Report
The Escalation Report gives in-depth details regarding escalations. It shows the user name, date,
settings, escalation type (Recurring or Non-Recurring), task details, and workflow and application
details.

C
ot
My Activities
The My Activities option is useful to keep track of the activities on which you have performed an
N

action. By default, Workflow Management keeps a copy of workflow history in My Activities. Based
on security rights, the My Activities option is displayed.
My Activities will give in-depth details regarding activities. It shows the Instance Id, Activity Name,
Activity Type, Action Status, Assigned On, Inlink Action Output, Updated On, Ended On, Output,
and Workflow details. Double-clicking the data brings up the Process execution view for the
workflow.
o
D

Workflow Management 2019


7-8 Module 7 – Reporting

Activity Time Details


This report presents details related to Activity Time transactions, as shown in the following image.
The report displays the time taken by each activity and its average time. This is related to all the
Activities.

y
op
Activity Performance Details
This report presents details related to Activity Performance transactions, as shown in the following
image. This is only related to the Human Activities. The report displays in descending order, from
Best Time (least time taken to run a particular activity) to Slow Time (most time taken to run a
particular activity).

C
ot
N

Execution Reports
There are six types of reports in this group:
 Executing
 Awaiting
o

 Completed
 Failed
 Aborted
D

 Paused
Double-click the workflow in the right pane to see the Process execution view.

Wonderware Training
Section 2 – Workflow Management Reports 7-9

Executing
This report presents details related to executing workflows.

y
op
Awaiting

C
This report presents details related to workflows awaiting execution.
ot
N
o
D

Workflow Management 2019


7-10 Module 7 – Reporting

Completed
This report presents details related to completed workflows.

y
op
Failed

C
This report presents details related to the failed workflows. There are no rows in the report
because there are no failed workflows.
ot
N
o
D

Wonderware Training
Section 2 – Workflow Management Reports 7-11

Aborted
This report presents details related to the aborted workflows.

y
op
Quickflows completed with errors are listed under Aborted instead of under Failed.

Paused

C
This report presents details of the paused workflows. There are no rows in the report because
there are no paused workflows.
ot
N
o
D

Workflow Management 2019


7-12 Module 7 – Reporting

y
op
C
ot
N
o
D

Wonderware Training
Section 3 – Introduction to the Process Execution View 7-13

Section 3 – Introduction to the Process Execution View


This section introduces the Process execution view window of a workflow. It explains how to
manage the execution of a workflow from the window and describes the views in the Process
execution view window.

BAM Process Execution View


The Process execution views show the workflow execution status graphically. You can view the

y
execution view window by double-clicking a top-level row in any of the reports. The view
represents the workflow up to the activity or execution status where the view was opened.
The toolbar at the top of the Process execution view window has the following tools:

op
 Full Screen - Click this tool to toggle between normal and full-screen modes
 Zoom - Use this tool to zoom in and out of the process definition image
 Refresh - Use this tool to refresh the image
 Resume paused workflows - Use this tool to resume paused workflows
 Abort executing workflows - Use this tool to abort workflows that are being run
 Pause executing workflows - Use this tool to pause workflows that are being run

C
Resume workflows finished with errors - Use this tool to resume paused workflows
The Process execution views are very useful in navigating through large process definitions. You
can click any activity in the view window to open the process definition in the Process Designer, at
that point.

Note: A white check mark superimposed is used to denote a completed activity or process. It is
ot
displayed on the top edge of the activity for all completed activities. This symbol is displayed at the
top-right corner of the page on the title bar to denote a completed process.

There are three tabs to navigate between the following three views:
 Analyst's View
N

 Progress View
 Execution View
o
D

Workflow Management 2019


7-14 Module 7 – Reporting

Analyst's View
The Analyst's View is a simplified view of the process design intended for users. It shows the
process model that was saved as the Business Analyst's View after the business process
modeling was completed and before the automation steps were added in the Process Designer. At
this stage, the model would have been saved to a file. This file should be assigned to the Analyst's
Process Model Filename for Execution View property of the Start activity to enable this view. To
display the Analyst's View, double-click the first row, which is highlighted below.

y
op
C
ot
When you hover the cursor over a workflow activity in the Process execution view screen, it shows
the Action Details, Best Time, Slow Time, and Average Time taken by the activity for a workflow
instance, as shown in the following image.
N
o
D

Wonderware Training
Section 3 – Introduction to the Process Execution View 7-15

Progress View
The Progress View shows the workflow progress on the Process Diagram up to the point that the
Execution View is selected. It consists of the execution view mapped on to the Process Diagram.
You can click a completed activity to view the Step Details Window. You can view the step details,
variables, contents, and content (raw content passed to the workflow) using the corresponding
tabs. The links that have already been completed are represented by thick lines.

y
op
C
ot
Execution View
The Execution View shows the workflow execution status up to the point that the execution view is
selected.
N
o
D

When you click the Approval activity, the Details page appears and displays the Step Details of the
activity. The details screen shows information on the following five tabs: Step Details, Variables,
Contents, Content, and Submitted Form Details.

Workflow Management 2019


7-16 Module 7 – Reporting

On the Step Details tab, the user can view all the details related to the Approval activity, such as
the time of the action, type of action, name of the actor to whom this action has been assigned,
and the action performed by the actor.

y
op
When you click the Variables tab, the screen showing the details of all the variables used in this
activity will be displayed. You can view the runtime values of the XML variable by clicking the Click
to view link.

C
ot
N

When you click the Contents tab, the contents specified in the activity will be displayed. The
o

Contents are the data that can be passed to the workflow while calling Client. Execute API as an
XML. They have to be declared in the Start activity along with the Xpath expression.
The raw format of the information given in the Contents tab will be displayed on the Content tab.
D

Wonderware Training
Section 3 – Introduction to the Process Execution View 7-17

When you click the Content tab, the data which will be passed to the workflow while calling Client.
Execute API as an XML will be displayed.

y
op
C
ot
N
o
D

Workflow Management 2019


7-18 Module 7 – Reporting

y
op
C
ot
N
o
D

Wonderware Training
Section 4 – Introduction to Analyze Reports 7-19

Section 4 – Introduction to Analyze Reports


This section describes how to work with layouts for Analyze Reports, which are table-based
reports. It discusses how to sort, group data (by field and by box), filter data, show and hide
columns, and then save, view, and delete layouts. It also describes how to export the data by
discussing settings and the formats available, including XML, Excel, HTML, and text.

Report View

y
The report view is in the right pane of the Reports window. It presents the report information in
several columns, with the columns displayed depending on the type of report selected. You can
right-click a column name to open the shortcut menu, where you can perform report list
management operations, such as sorting and grouping in the columns:

op
 Sort Oldest to Newest: Sort the list in this column with the oldest at the top
 Sort Newest to Oldest: Sort the list in this column with the newest at the top
 Group By This Field: Group the list by this column
 Group By Box: Display the Group By box at the top.
You can drag and drop a column header in this box to group the list by that field. This is an
alternative way to group the list.


C
Remove This Column: Remove the selected column
Best Fit: Change the column width to best fit
Filter Bar: Turn on or turn off the filter bar
Select Columns: Expand a menu with all the column headers
Each column name has a check box that you can use to select it or remove the selection.
ot
After making any change to the column selection, you can click the Apply Changes option
for the new settings to take effect. You can click the Reset option.

Save or Delete a Layout


N

You can customize the view and save the layout by clicking the Save Layout button. This opens a
window where you can specify a name with which the customized report layout will saved.
You can enter the file name for the saved layout in the Layout Name box. After specifying the
name, click OK to save the layout. You can click Cancel to close the window without saving the
layout. Any layout saved in this window will be added under the node corresponding to the report
type being saved as a custom layout (for example, Executing). You can select it from here to view
o

the report in the customized layout.


In addition to the other buttons, a Delete button is displayed when you open a custom layout. You
can click the delete button to delete the open custom layout.
D

Workflow Management 2019


7-20 Module 7 – Reporting

Export Data
You can export your report data.

Export Settings
Use the Export Settings button to set the number of records to export.

y
op
When you click the Export Settings button, the Export Settings dialog box appears. Enter the
number of records you want to export.

C
You can enter only valid positive integer values. Click Update. The Reports grid refreshes and
displays the number of records entered in the Export Settings dialog box. Click the Export Grid
button to export the report.
ot
When you enter a value for export, the number of records exported will be the first record to the
number entered. For example, if the grid contains 25 records and you want to export 12 records,
records from 1 to 12 will be displayed in the refreshed grid and can be exported. You cannot enter
a value range for export. Also, if the number entered exceeds the maximum records present, the
highest number of records present will be exported.
N

Export Grid
You can export the contents of the report to different formats using the Export grid tool at the
bottom-right of the window.
o
D

Clicking the export tool opens the export type selector, which lists all the available types. There are
three sets of options. The first has the Export root table, which you use to select the root table for
export. The second set lists all the common file formats, such as HTML, PDF, XML, Excel, TIFF,
RTF, and TEXT. The last set has the Portrait and Landscape options to select the orientation of the
exported report. After selecting the export settings, you click Export now to export the file.

Wonderware Training
Lab 19 – Working with Workflow Management Reports 7-21

Lab 19 – Working with Workflow Management


Reports

Introduction
In this lab, you will focus on reporting capabilities. You will check aborted, finished, and sleeping
workflows using bar charts, graphical views, and report details. You will check the status of
workflows using different views. You will remove columns you do not need in reports and save the

y
customized layout. You will search for the different IDs available to help with troubleshooting,
including Instance Id and ExecutionID. You will export data as different file types and use the Filter
Bar to filter various information.

op
Objectives
Upon completion of this lab, you will be able to:
 Analyze different views for a workflow instance
 Perform a search/filter operation
Export report data

C
ot
N
o
D

Workflow Management 2019


7-22 Module 7 – Reporting

Use the Reports Menu


You have used the Reports menu in previous labs to check the different Execution views,
including Executing, Awaiting, and Completed. Now, you will use some of the other functions
available in Reports.
1. Ensure you are logged in as the admin user.

2. In the hamburger menu, click Reports .


The Workflow Management Business Activity Monitoring page appears. It contains the

y
reports for all the processes you have performed, including workflows and forms.

op
C
ot
3. In the Global Reports pane, under Dashboard, click Workflow Statuses.
In the right pane, a bar graph representing the status of workflows being run by the application
appears. This report enables you to get a three-dimensional view of the number of aborted,
N

finished, and sleeping workflows.


Note the number of sleeping workflows.
o
D

Wonderware Training
Lab 19 – Working with Workflow Management Reports 7-23

4. At the top-left of the right pane, for View Direction, in the X-Axis drop-down list, select 15.
Notice the change in the bar graph. Notice the changes after you perform the next two steps.
5. In the Y-Axis drop-down list, select 5.
6. In the Z-Axis drop-down list, select 20.
7. Try different values.
8. Under Dashboard, click Workflow Instances.
In the right pane, a bar graph representing the concurrent workflows being run by the

y
application appears.
9. On the Workflows page, right-click a workflow that is in draft mode, and click Publish and
Test Run.

op
If there are no draft workflows, unpublish a workflow, and then perform the step.
10. In the Process execution view on the Analyst’s View tab, note the activity that is waiting.
11. Use the Reports menu to view the Workflow Instances.
Notice that the workflow you published has been added.

C
ot
N

12. Click Workflow Statuses and note that the number of Sleeping workflows has increased
because the activity is awaiting an action.
Note the number of aborted workflows.
o
D

Workflow Management 2019


7-24 Module 7 – Reporting

13. In the Process execution view, at the top of the window, click the Abort executing workflow
button.

y
op
A message appears that the workflow aborted successfully.

14. Click Close. C


15. Use the Reports menu to view the Workflow Statuses.
ot
Notice that the number of aborted workflows has increased.
N
o
D

Wonderware Training
Lab 19 – Working with Workflow Management Reports 7-25

16. In the Global Reports pane, under Analyze, expand Transaction.


17. Click Activity Details, and in the right pane, notice the top item shows the workflow you
aborted, as indicated in the Action Status by Killed.

y
op
18. Review the other information, and scroll over if necessary to see additional columns and get
the complete information about this activity.
19. Expand a few of the items in the list to get additional work item details.
If the activity has ended, there will not be much detail.

C
ot
N

Note: The first column, Instance Id, is the most important item in reporting. You search for
this ID when troubleshooting or looking for an error.
o

20. On the Workflows page, right-click a workflow that is in draft mode, and click Publish and
Test Run.
D

If there are no draft workflows, unpublish a workflow, and then perform the step.

Workflow Management 2019


7-26 Module 7 – Reporting

21. In the Process execution view, on the Analyst’s View tab, review the Instance Id.

y
22. Return to Reports and under Analyze, expand Transaction and click Activity Details.

op
The workflow you published is at the top of the list and is awaiting an action. The ID you noted
is not in this list because that was the workflow ID, but this list shows the activity IDs.

C
ot
The instance ID for workflows is called the Execution ID and for activities is called the
Execution Details ID. You will use these later.
N
o
D

Wonderware Training
Lab 19 – Working with Workflow Management Reports 7-27

23. Under Analyze\Transaction, click WorkItem Details.


24. Expand the top item, and note the details of every stage of the workflow.
25. Review the other items in the list and note the Priority and Response By columns.
The Response By column has an entry when there was a timeout.

y
op
26. Scroll over and note the Subject column, which includes subjects that used variables.

C
ot
N

When there are columns that you do not need, you can remove them.
27. Scroll to the left and right-click the Response By column and select Remove This Column.
o
D

28. Remove the Forwarding Allowed, Is Delegated, Hold Duration, Pause Duration,
Delegated From, and Delegated To columns.
If you leave this edited layout, when you return to this page, it will default to the full layout with all
the tabs you deleted. You can save this custom view.

Workflow Management 2019


7-28 Module 7 – Reporting

29. At the top-right of the window, click the Save Layout button.

30. In the Save Layout dialog box, in the Layout Name field, enter CustomLayout.

y
op
31. Click OK.
32. In the left pane, expand Transaction and click WorkItem Details.
The original view with all the columns appears.

C
ot
33. Expand WorkItem Details and click CustomLayout.
The saved layout appears.
N
o

You can also export records.


D

34. Click WorkItem Details and at the top-right of the window, click the Export Settings button.

Wonderware Training
Lab 19 – Working with Workflow Management Reports 7-29

35. In the Export Settings dialog box, enter 100 for the number of records to export.

36. Click Update.

y
At the bottom-right of the window, the number of records is provided. It displays 50 records, and
then when you scroll down, it loads another 50 records and the displayed number increases by 50.
Next to the number of records is a toolbar with the Refresh, Export, and Export As buttons. The

op
Export button exports in chunks of 50. The Export As button provides different file types for
saving the file.
37. At the bottom-right of the window, click the Export As button and in the drop-down list, click
Excel, and then at the bottom of the list, click Export now.

C
ot
A window opens with the file in Excel format. Your window may not open at first if Microsoft
Office is not installed.
N
o
D

Workflow Management 2019


7-30 Module 7 – Reporting

38. Close the window, and then export the records as PDF.
A window opens with the PDF file.

y
op
39. Close the window, and then export the records as HTML with Landscape selected in the
drop-down list.

C
ot
A window opens with the HTML file in landscape format.
N
o
D

Wonderware Training
Lab 19 – Working with Workflow Management Reports 7-31

40. Close the window.


41. In the left pane, under Transaction\WorkItem Details, click Transaction Type Details.
The details appear in the right pane.
42. In the right pane, expand TransactionType: Abort and note the transactions that were
aborted.

y
op
43. Scroll down and expand TransactionType: Information and note the details about the
Information activities used in workflows.

C
ot
N
o

44. Scroll down and expand TransactionType: Information Deleted and note the Information
activities that were deleted.
D

This section only appears if you deleted files.

Workflow Management 2019


7-32 Module 7 – Reporting

45. In the left pane, under Transaction\WorkItem Details, click Escalation Report.
Calendars appear in the right pane at the top, which you can use to check tasks you did not
complete in the given time.
46. In the right pane, in the calendars, select From and To dates.

y
If any escalations occurred during the time period, they will be listed.

op
47. In the left pane, under Transaction\WorkItem Details, click My Activities.
The details of activities on which you worked appear in the right pane.

C
48. In the left pane, under Transaction\WorkItem Details, click Activity Time Details.
The activity type and the average time taken for activities appear in the right pane.
ot
N
o
D

Wonderware Training
Lab 19 – Working with Workflow Management Reports 7-33

49. In the right pane, expand Activity Type: Approval to see all the Approval activities and their
times.
The details include the time taken for the activity. In the column headings, note the Execution
ID for workflows and the Execution Details ID for activities.

y
op
50. Expand the other activity types and note the times.
This is a good way to check performance.
51. In the left pane, under Transaction\WorkItem Details, click Activity Performance Details.

C
The details of the performance appear in the right pane, including the time taken for the
activity. If an activity takes more time, it shows there is a problem. These details also include
the Execution ID and the Execution Details ID.
ot

52. To troubleshoot a specific ID, for example an ExecutionID, right-click the ExecutionID
N

column heading and in the drop-down list, select Filter Bar.


o
D

The Filter Bar appears.

Workflow Management 2019


7-34 Module 7 – Reporting

Now, you will search for specific IDs. If you get no results for the IDs noted, search for IDs that are
in your reports.
53. Click below ExecutionID and enter 24.

54. To the right of the field, click and note all the commands in the drop-down list.

y
55. In the drop-down list, ensure Equals To is selected, and then click Apply All Filters.

op
C
All the workflows with that ExecutionID appear. You can check any issues related to activities.
ot
N

The Filter Bar is available for other transactions, like WorkItem Details.
56. In the left pane, click WorkItem Details.
57. In the right pane, right-click the Response By column heading and in the drop-down list,
select Filter Bar.
o
D

The Filter Bar appears.

Wonderware Training
Lab 19 – Working with Workflow Management Reports 7-35

58. Click below Priority and enter 34.

59. To the right of the field, click and in the drop-down list, ensure Equals To is selected, and
then click Apply All Filters.

y
op
C
All the workflows with that Priority number appear. You can check any issues related to
activities.
ot
N
o
D

Workflow Management 2019


7-36 Module 7 – Reporting

You have used the Execution options to view the status of workflows in previous labs. You can
also search for specific IDs using the Filter Bar.
60. In the left pane, expand Execution and click Executing.
61. In the right pane, right-click the Instance Id column heading and in the drop-down list, select
Filter Bar.

y
op
Filters. C
62. In the Filter Bar, click below Instance Id and enter 29.

63. Click and in the drop-down list, ensure Equals To is selected, and then click Apply All

All the workflows with that Instance Id number appears.


ot
64. Expand the item, and then fully expand the instances to get more information on what is
instantiated.
N
o
D

Wonderware Training
Lab 19 – Working with Workflow Management Reports 7-37

65. If you would prefer a graphical view, double-click the item (top of the list) to see the Process
execution view on the Analyst’s View tab.
You have used this view many times before to get a complete view of the status of the
workflow.
66. At the top-left of the Process execution view window, change the percentage to zoom out or
in.
The maximum view is 100%.

y
op
C
67. In the Process execution view window, click the Progress View tab to see the progress of
the workflow.
ot
68. Click the Execution View tab to see what has been run.
In the Reports window, you have used most of the other Execution options, but click each item in
the list and note the information in the right pane.
N
o
D

Workflow Management 2019


7-38 Module 7 – Reporting

y
op
C
ot
N
o
D

Wonderware Training
y
op
Section 1 – Packaging
C
Module 8 – Application Distribution
8-3
ot
Lab 20 – Creating, Exporting, and Importing a Package 8-9
N
o
D
8-2 Module 8 – Application Distribution

Module Objectives
 Explain packaging configuration/operation
 Discuss the Template Package
 Add artifacts
 Export and import a package

y
op
C
ot
N
o
D

Wonderware Training
Section 1 – Packaging 8-3

Section 1 – Packaging
This section explains how and when to back up the repository data. It discusses the Package
Template, focusing on the advantage of using Package. It discusses Package versus Recovery. It
also describes how to add artifacts to a package template and how to export and import a
package.

Advantages of Package

y
Currently, packaging and deploying one or many artifacts from one environment or repository to
another is done by exporting and importing the artifacts. You can use the recovery task of
packaging to deploy one or many artifacts from one environment or repository to another.

op
Package Versus Export Import
The export and import feature is helpful when you want to deploy a single artifact in a different
environment. You can export and import only one artifact at a time. An imported artifact is not
always valid in the target environment, if the associated artifact is not present. For example, if you
create a workflow and add an Information activity and assign it to a queue. You export the
workflow and import it in an environment that has no queues created. Since the named queue

C
does not exist in the target environment, the workflow is invalid. You will have to manually create
the named queue in the target environment.

Package Versus Recovery


The recovery feature allows you to replicate the entire repository with all the artifacts in the target
ot
environment. A choice to add only a few artifacts to the target environment is not available. This
option is beneficial when the entire repository needs to be deployed in another environment.

Package Template
You can use the Package Template list in the source environment to create and design a package
N

template to which you can add artifacts and update the configuration settings. You can use the list
to perform the following tasks that help you create, design, and export a package template file:
 Create package template
 Edit package template
 Publish package template
o

 Generate package template


 Export package template
 Mark package template as shipped
D

Workflow Management 2019


8-4 Module 8 – Application Distribution

Actions Executable in the Ribbon Menu


The following table lists the actions that you can perform from the action bar of the Package
Template list:

Button Description
Navigate button to navigate from the current folder to the parent folder.
This feature is helpful when you are accessing a folder within the Package Templates
and you want to navigate back to the parent folder of the Package Template list.
New Package Template button to create a package template.

y
Folder button to group and categorize the package templates.

op
Edit button to modify or delete the artifacts and define the target values, configuration
state, and prerequisites.

View button to view the package template in read-only mode.

Delete button to delete the selected package templates.

C
Note: You cannot delete a package template that is marked as shipped.

Publish button to publish the selected package template.

Unpublish button to unpublish the selected package template.


ot
Generate button to generate the package file. The generated package file has the
.awsPKG extension.
Export button to export the packaged file to a specific folder.

Organize button to organize the package templates and group them in specific folders.
N

Security Settings button to define security at the List Item level.


o

Actions Executable in the Shortcut Menu


The following table lists the actions that you can perform from the shortcut menu of the Package
Template list:
D

Shortcut Menu Options Description


Edit Modify or delete the artifacts and define the target values, configuration state,
and prerequisites.
View View the details of the selected package template in read-only mode.
Publish Publish a package template that is in draft status.
Unpublish Unpublish a package template that is in published, generated, or exported
status.
Generate Generate a published package template.

Wonderware Training
Section 1 – Packaging 8-5

Shortcut Menu Options Description


Export Export the package template file.
Mark as Shipped Mark the package template as shipped once it is exported.
Save As Save the package template in different versions. By default, when a package
template is created, it is saved as version 1.
Delete Delete the selected package template.
You can delete the package template no matter its status.
Show All versions View all the versions.
This option is useful as the package template list displays only the latest

y
published version of the package template or only the latest version of a draft
when all the versions of the package template are in draft status.
Security Settings Define security at the List Item level.

op
Note: Package templates created in previous versions of Workflow Management must be
regenerated.

Best Practices of Packaging

C
The following list provides some of the best practices or guidelines which you can adhere to while
packaging.
Before adding artifacts to the package, ensure all the artifacts that need to be added to a package
are in the Published state.
Identify the artifact that has the complete relationship for the project to be packaged.
ot
 If a navigation list item points to the master form (a form that is associated with all the
other artifacts), go to the Navigation page, and then add the navigation to the package.
 If there are multiple master forms that do not have a relation among each other, add each
of these forms individually to the package template. Ensure that the package template
settings are the same while adding each form to the package.
 If the master form is not used in navigation, go to the Forms List page and then add the
N

master form to the package.


 If there is only a master workflow, go to the Workflow List page, and then add the workflow
to the package.
If you have created a project folder for forms, workflow, or any other lists, which are meant to be
packaged together, add the folder to the package for easier tracking.
o

If a package is already shipped and installed, and if you add or modify some artifacts of the
package, you must create another version of the same package template, and then add or modify
the artifacts in the newly created version of the package template.
D

Note: Custom files and scripts will not be identified as modified items.

You can configure the common parameters for different artifacts in the Runtime Initialization
Settings form before installing the package. For more information about runtime initialization
settings, see the Runtime Initialization Settings section in the Developer Guide.
Ensure that the Runtime Initialization Settings form is a single form that does not have any
association with other forms. It is recommended that you configure the artifacts (such as Forms,
Workflow, Database Connection, and so on) as different tabs in the Runtime Initialization Settings
form for easy configuration.

Workflow Management 2019


8-6 Module 8 – Application Distribution

Ensure that you install a package only during off-production.


If you use a case-sensitive database to create a repository, you can create items with the same
name in different cases. For example, a case-sensitive database considers DATABASE1 and
database1 as two different items. In this case, the package will be imported as two different items.
If the database is not case-sensitive, you cannot create an item with the same name.
Do not create two different items with the same name in a case-sensitive database. If you package
and import such items to a not case-sensitive database, the package gets imported as the next
major version.
Before packaging, verify whether all the custom-dependent files that are used are identified and

y
added to the package. If any of the custom-dependent files are not added, it is recommended that
you add these files to the Additional Package Files section in the Package Template tree.
Ensure that all the custom files used are placed in the installed Workflow Management path.

op
Recommendations
The appropriate target platform is used while installing packages. For example, if the package is
created in 64-Bit, it is recommended that you install the package in 64-Bit. The prerequisite
packages are installed before installing the required package. The different versions of a specific
package template should use the same Runtime Initialization form.

C
If you face any issues or errors while adding artifacts to the package, it is recommended that you
open the WMLogger Console, so that you can view the error messages or warnings.

Exporting a Package Template


Use the Export option to export and save the .awsPKG file generated from a package template to
ot
a location that you want.
To export a package template file, in the Enterprise Console, click the Menu button, click Package,
and then click Package Template. The Package Template page appears. Select the required
package template, and then click the Export icon on the action bar. A confirmation message to
export the package template appears. Alternatively, right-click the selected package template, and
then select Export in the shortcut menu. Click OK to export the package template or click Cancel.
N

Provide the location information to save the .awsPKG file, and then save the file. A confirmation
message about the successful export appears. The .awsPKG for the selected package template is
saved in the specified location.
Note the following:
 The exported package file name format is:
RepositoryName_PackageTemplateName_PackageTemplateVersion_TargetPlatform.awsPKG.
o

 You can export package templates with status Generated or Shipped only.
 When you export a package template that is in Draft status, the system automatically
publishes and generates the package template before exporting the same. Similarly, when
D

the package template is in Published status, the system automatically generates the
package template before exporting the same.
 You can import an exported package template from source environment to the target
environment.

Wonderware Training
Section 1 – Packaging 8-7

Importing a Package
You can execute and install package files that are imported to the Manage Package list in the
target environment. Use the Import option in the Manage Package list to import the .awsPKG file in
the target environment. A package does not get imported if any background msi runs in the target
machine.
To import a package, log in to the Enterprise Console. On the Enterprise Console menu, hover
over Package, and then click Manage Package. The Manage Package page appears. On the
action bar, click New, and then click Import. The Import Package dialog box appears. Browse to
select the Package File. Enter a description for the package file to be imported. Click Import. The

y
Manage Package list in the target environment displays the imported package. The status of the
imported package is Not Installed. If you import the same package again, the package is saved
with the next major version.

op
C
ot
N
o
D

Workflow Management 2019


8-8 Module 8 – Application Distribution

y
op
C
ot
N
o
D

Wonderware Training
Lab 20 – Creating, Exporting, and Importing a Package 8-9

Lab 20 – Creating, Exporting, and Importing a


Package

Introduction
In this lab, you will back up all the work you did in this course using packaging, and then export all
the data using the Export feature. You will then use the Import feature to import the data.

y
Objectives
Upon completion of this lab, you will be able to:

op
 Add artifacts into a Package Template
 Publish, generate, and export a package
 Import a package

C
ot
N
o
D

Workflow Management 2019


8-10 Module 8 – Application Distribution

Package Workflows
You have used an export function to back up a workflow or form. However, that function does not
back up other information associated with the workflow or form, such as lookups, grids, and
database connections. The packaging function backs up the workflows and forms, as well as all
associated artifacts or information. You will use that function now.
1. Ensure you are logged into Enterprise Console as the admin user, and then in the
hamburger menu, click Package | Package Template.

y
op
C
ot
2. Click New , and then on the toolbar that appears, click Template .
N
o
D

Wonderware Training
Lab 20 – Creating, Exporting, and Importing a Package 8-11

The New Package Template window appears.


3. Enter the following information:

Title: TrainingPackage
Description: Packaging

y
op
4. Click Save Template.
C
ot
A message appears that the named package was saved successfully.
N

5. Click Close.
The package is added to the Package Template page.
o
D

Workflow Management 2019


8-12 Module 8 – Application Distribution

A workflow must be published before you can package it. The Add to Package Template
command is only available in the right-click menu for published workflows. The command is not
available in the menu for draft workflows.
6. On the Workflows page, right-click a draft workflow and confirm the Add to Package
Template command is not in the drop-down list.
If there are no draft workflows, unpublish a workflow, and then perform the step.

y
op
C
7. Right-click a published workflow and confirm that the Add to Package Template is in the
drop-down list.
ot
N
o
D

Wonderware Training
Lab 20 – Creating, Exporting, and Importing a Package 8-13

8. To ensure all the workflows are published, click the check box at the top-left of the column
headings to select all the workflows.

y
op
9. At the top-right of the page, click Publish to publish all workflows and artifacts, and then
click Close in the message that appears.
If you get an error, notify the instructor.

C
10. Right-click the published workflow at the top of the list and in the drop-down list, click Add to
Package Template.
The Add to Package Template window opens.
11. In the Package Template drop-down list, select TrainingPackage.
12. In the Package Template Version drop-down list, leave the default 1.
ot
13. For Include Associated Artifacts, leave the default Yes.
14. For Include Child Artifacts, click Yes.
15. For Include the automatically generated SQL Script, leave the default Yes.
N
o
D

Workflow Management 2019


8-14 Module 8 – Application Distribution

16. Click Next.


17. In the Configuration pane on the left, in the Artifacts section, review the information that was
added.

y
op
C
18. Expand Event Associations and note the information that was automatically added.
ot
N

19. In the right pane, review the options and scroll down to see all options.
20. Click Save Template.
A message appears that the named package was saved successfully.
21. Click Close.
o

22. Repeat Steps 10 to 21 for all the published workflows.


Now, you will publish the package.
23. In the hamburger menu, click Package | Package Template.
D

24. Select the package and publish it.


The package will be published.

Wonderware Training
Lab 20 – Creating, Exporting, and Importing a Package 8-15

25. In the toolbar at the top-right of the page, click the Generate button.
A message appears that the package template was generated successfully.

y
26. Click Close.

Export a Package

op
Now, you can export the package.

27. With the package selected, in the toolbar, click the Export button.
A message appears confirming that the package file will be exported.

28. Click OK.


C
ot
The file is exported, as indicated by the PKG file at the bottom-left of the page.
N

29. Right-click the file and select Show in folder.


The location of the file appears. Google Chrome exports files to the Downloads folder by
default.
30. Copy the file, and then navigate to the C:\Training folder and paste it.
o
D

Workflow Management 2019


8-16 Module 8 – Application Distribution

Import a Package
Next, you will import the package. Typically, you import the package on another machine, but you
will import the package in the same machine for this lab.

Note: You can create a new repository (you did this in Lab 1) to test this feature in the same
machine. If you create a new repository, log in as the admin user and continue the steps below.

31. In the hamburger menu, click Package | Manage Package.

y
op
C
ot
32. Click New , and then on the toolbar that appears, click Import .
N

The Import Package dialog box appears.


33. Click the Choose File button, and navigate to C:\Training.
34. Select the package file.
o

35. Click Open.


D

Wonderware Training
Lab 20 – Creating, Exporting, and Importing a Package 8-17

The file path populates the field.

y
op
36. Click Import.
A message appears that the package was imported successfully.

37. Click Close.


C
Now that the package is imported, you have to install it. You would typically install the package on
another machine, so you may get some error messages during the installation on the same
machine.
ot
38. On the Manage Packages page, click the package.

39. In the toolbar at the top-right of the page, click the Install button.
The Package Installation window appears with all the artifacts that will be installed. In the
Edit column, the Edit button can be used to edit the artifact configuration for that row. Also,
N

observe the bottom-left corner of the window that shows the total number of Errors,
Warnings, and Information.
o
D

Workflow Management 2019


8-18 Module 8 – Application Distribution

40. Click Install Package.


The Package Installation window updates and shows a progress bar. The list increases as
more items are installed.
When the installation is complete, a message appears and may confirm a partial installation
because you installed the package on the same machine.
41. Click Close.
42. The Package Installation window reappears with a message that the package installation is
complete.

y
op
C
ot
43. Click Close.
All the files have been installed in the appropriate locations: the workflows were added to the
N

Workflows page, the forms to the Forms page, and so on.

Uninstall a Package
If you decide that you do not want the package you installed, you can uninstall the package.
44. In the hamburger menu, click Package | Manage Package.
o

You must perform this step to update the status of the package to Installed and make the

Uninstall button available.


D

Wonderware Training
Lab 20 – Creating, Exporting, and Importing a Package 8-19

45. Select the package, and in the toolbar at the top-right of the page, click the Uninstall
button.
The Package Uninstallation page appears with all the artifacts that will be uninstalled.

y
op
46. Click Uninstall.

as more items are uninstalled.


C
The Package Uninstallation window updates and shows a progress bar. The list decreases

When the uninstallation is complete, a message appears confirming a partial uninstallation


because you installed the package on the same machine, but you will not get errors when you
uninstall on a different machine.
ot
47. Click Close.
The Package Uninstallation window reappears with a message that the package
uninstallation is complete.
N
o
D

48. Click Close.

Workflow Management 2019


8-20 Module 8 – Application Distribution

The Package Status displays Uninstalled.

y
op
C
ot
N
o
D

Wonderware Training

You might also like