Professional Documents
Culture Documents
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
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
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
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
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
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
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
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
Wonderware Training
Section 1 – Course Introduction 1-5
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 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.
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
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
y
op
C
ot
N
o
D
Wonderware Training
Section 2 – Introduction to Workflow Management Software 1-9
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.
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
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
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
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
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
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
Delivers an integrated solution for process analysis, modeling, execution, and monitoring
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
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
Security
o
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
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
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
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
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
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
Optimization
Measure and manage processes
Get real-time workflow statuses
Improve business performance
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
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
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
y
op
C
ot
N
o
D
Wonderware Training
Section 3 – Licensing and System Requirements 1-23
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
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
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
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
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
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
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
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
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
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.
C
ot
N
o
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.
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.
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
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
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.
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
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.
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.
Desktop Applications
Workflow Management provides extensive APIs and web services that can be called from various
N
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
Wonderware Training
Section 1 – Workflow Management Core Concepts 2-7
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.
C
This is used internally by Workflow Management for provisioning and deployment.
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.
Web Services
Workflow Management provides out-of-the-box activities that can be used to call a third-party web
service from a workflow.
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:
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
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
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
y
op
C
ot
The DataSource List page appears.
N
o
D
Wonderware Training
Lab 1 – Creating a Workflow Management Repository 2-13
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
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
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
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
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
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
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
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.
The Enterprise Console appears and, after a few moments, the repository that was created
o
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
y
op
41. Minimize the window.
C
ot
N
o
D
Wonderware Training
Section 2 – Workflow Management Security 2-23
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
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 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
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.
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.
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
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.
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.
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.
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
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
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
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
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
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
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
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
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
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
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
y
27. Click Close.
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
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.
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
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
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.
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
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.
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
y
op
C
ot
59. Click Save.
A message appears confirming that the resource mapping was saved successfully.
N
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
y
op
C
ot
N
o
D
Wonderware Training
Section 3 – Working with Process Designer and Activities 2-43
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
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
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
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:
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
Activity Properties: Open the Activity Properties window to set the properties for the
selected activity.
Publish
A workflow is deployed and activated only if it is published.
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
WorkItemList Layout: Display all the work item fields that have been added.
Wonderware Training
Section 3 – Working with Process Designer and Activities 2-49
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
Copy
Paste
D
Show or hide the Activities Toolbox (Workflow Management activities), which has the list of
activities.
Activity Properties
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
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.
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
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
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
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
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
y
op
C
ot
N
Wonderware Training
Section 3 – Working with Process Designer and Activities 2-59
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
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
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
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
y
op
C
ot
N
o
D
Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-67
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
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
y
op
C
A toolbar appears with several workflow types.
5. Click Workflow to create a standard workflow.
ot
N
o
D
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
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
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
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.
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
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
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
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
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
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
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
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.
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
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
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
Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-85
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
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
Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-87
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
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
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
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
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
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
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.
Wonderware Training
Lab 3 – Creating a Workflow Management Workflow 2-95
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.
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
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
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
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.
C
99. In the hamburger menu, click Reports .
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
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
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
y
op
C
ot
N
o
D
Wonderware Training
Lab 4 – Exporting and Importing a Workflow 2-105
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
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
y
The file is exported, as indicated by the XML file at the bottom-left of the page.
op
C
ot
N
The location of the file appears. Google Chrome exports files to the Downloads folder by
default.
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
y
op
14. Click Save & Continue.
C
ot
A message appears confirming that the workflow was created successfully.
N
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
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
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
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
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
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
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
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.
y
The Workflows page appears.
op
3. Click New .
C
A toolbar appears with several workflow types.
Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-119
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
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
Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-121
y
op
Now, you will add a spill cycle.
C
19. Add and configure another row as follows:
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
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
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.
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
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:
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
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
Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-127
y
op
C
ot
N
o
D
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
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.
54. In the bottom area of the window, for No. of additional Task Types, leave the default number
1 and click Add New.
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
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:
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
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
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
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:
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)
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
90. Select the Information1 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)
C
Notification that operator has not taken action
Wonderware Training
Lab 5 – Using Human Activities with Variables in a Workflow 2-139
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
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
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.
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
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
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
y
op
110.Click Publish and Test Run.
C
The Analyst’s View appears with the Notification Choice activity awaiting action.
ot
N
o
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
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
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
y
op
C
ot
N
o
D
Wonderware Training
Section 5 – Scheduler and Engine Activities 2-149
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
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
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
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
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.
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
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
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:
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.
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
y
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.
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
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.
y
op
C
ot
N
o
D
Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-161
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
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.
C
7. In the Description field, enter Using Decision Activity for Conditional Checking.
ot
N
o
D
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
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
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
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
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
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
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
Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-171
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
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
Information4
y
Name: Inform Supervisor on Approval
Description: Inform Supervisor of Approved Spill Action
Assign Actor(s): Lenny (Supervisor 1)
op
Information5
C
ot
N
o
D
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:
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
y
op
41. Expand Workflow Instance.
C
42. Scroll down to Variables and expand it to display the variables you have declared.
ot
N
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
Wonderware Training
Lab 6 – Using Decision Activity for Conditional Checking 2-177
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
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
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
You have configured the Subject property. Now, you will configure the Body property.
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
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
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.
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.
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
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.
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
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
y
op
C
ot
N
o
D
Wonderware Training
Section 6 – Integration and Email Activities 2-193
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.
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
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
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
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.
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
Wonderware Training
Section 6 – Integration and Email Activities 2-197
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/
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
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
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.
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.
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
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
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
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
Wonderware Training
Section 6 – Integration and Email Activities 2-205
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
window.
Activity outputs: None
The Notification activity does not return any value.
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.
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
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
y
op
C
ot
N
o
D
Wonderware Training
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-211
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
C
Assign a task to a user based on conditional checking
ot
N
o
D
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
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
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.
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
Wonderware Training
Lab 7 – Using Script Activity for Conditional Allocation of Approver 2-215
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
17. Use the Activity Properties pane to configure the two Information activities you added as
follows:
Information4
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:
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.
op
C
ot
23. Click Update.
24. Click Save.
N
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:
op
Description: Cleaning Crew Action for Spill Cleaning
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
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
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
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
y
op
You will use the CSharp code.
C
ot
64. Select the sample VBScript code.
N
o
D
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
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:
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
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
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
y
op
C
ot
N
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
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
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
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
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
Publish
A workflow is deployed and activated only if it is published.
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
Wonderware Training
Section 1 – Controls Overview 3-5
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
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.
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
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.
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
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.
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
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.
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
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
y
property is false.
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
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
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
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
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
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
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
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
y
op
C
ot
21. Hover over the activity to get some information like the time the activity was started.
N
o
D
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
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
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
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
y
op
C
40. Press the Tab key to add the work slot to the list.
ot
N
o
D
y
op
Next, you will configure the working and nonworking days.
42. Click the Days tab.
C
ot
N
Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-27
y
op
45. In the Consider as Holiday area, click the Yes option.
C
ot
N
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.
Wonderware Training
Lab 8 – Using Calendar for Timeout and Escalations 3-29
y
op
This date will be treated as a nonworking day.
C
ot
N
o
D
y
op
C
ot
N
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
y
op
C
ot
N
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
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
y
op
C
ot
N
o
D
Wonderware Training
Section 3 – Workflow Management Queue 3-35
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
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
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.
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
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.
C
ot
N
o
D
Wonderware Training
Lab 9 – Creating Queues 3-39
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
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
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
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
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
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
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
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
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
Wonderware Training
Lab 9 – Creating Queues 3-47
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
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
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
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
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
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
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
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
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
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
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
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
You will need to log in as these users later, so write down their names.
Wonderware Training
Lab 9 – Creating Queues 3-59
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
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
Wonderware Training
Lab 9 – Creating Queues 3-61
A message appears confirming that the selected queue items were picked and assigned to a
user.
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
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
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.
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
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
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
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
Wonderware Training
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow 3-69
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
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.
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
Information1
Information2
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
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
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
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
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
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
Wonderware Training
Lab 10 – Creating a Backup Utility Using the File Watcher Workflow 3-81
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.
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
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
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
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
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.
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.
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.
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
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
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.
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
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.
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
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.
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
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.
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
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.
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
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
C
ot
N
o
D
Wonderware Training
Section 2 – Form Controls and Containers Overview 4-13
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
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.
y
XML Variables and Nodes
op
The following sections describe controls and containers within a form using XML variables and
XML Nodes.
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
y
op
C
ot
Common Properties Available for All XML Variables
N
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.
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
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
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
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.
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
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.
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
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
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
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.
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
Wonderware Training
Section 3 – Controls and Containers 4-23
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
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.
y
op
C
ot
N
o
D
Wonderware Training
Lab 11 – Working with Basic Form Controls 4-25
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
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
Wonderware Training
Lab 11 – Working with Basic Form Controls 4-27
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
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
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
button.
ot
The Properties window appears on the right side of the screen.
N
o
D
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
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:
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:
Value:
Human Error
2
C
ot
N
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
Wonderware Training
Lab 11 – Working with Basic Form Controls 4-35
y
op
C
ot
38. Click Apply to apply the first Text settings.
The form appears with the configured controls.
N
o
D
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
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
43. To see how the form would appear on a mobile device, on the toolbar at the top of the page,
y
op
view.
C
44. To see how the form would appear on a tablet, click
Wonderware Training
Lab 11 – Working with Basic Form Controls 4-39
y
49. In the Maximum Length field, enter 5.
op
C
ot
N
y
op
C
ot
N
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
y
op
C
ot
60. Click Finish to submit the form.
An error message appears because some required information is missing.
N
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
y
op
C
ot
65. Click Finish.
The Instance XML window appears.
N
o
y
op
C
ot
N
o
D
Wonderware Training
Section 4 – Forms Design Layout and Scripting 4-45
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.
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
y
op
C
ot
N
o
D
Wonderware Training
Lab 12 – Scripting in Form Controls 4-47
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
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
7. In the Enterprise Console, on the Forms page, click New , and then on the toolbar that
D
Wonderware Training
Lab 12 – Scripting in Form Controls 4-49
y
op
10. Click Save & Continue.
C
ot
The Form Options window appears.
N
o
D
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
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
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
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
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
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:
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
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
Name: Department
XML Node: Department
N
Read-Only: Yes
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
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
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:
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
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
Enable: No
y
op
C
ot
60. Click Apply.
N
o
D
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
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
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
If it gives a message that the line in the script was not what it was expecting, it is OK to ignore
it.
D
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
Wonderware Training
Lab 12 – Scripting in Form Controls 4-69
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
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
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
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
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
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
Wonderware Training
Lab 12 – Scripting in Form Controls 4-75
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.
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
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.
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
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
y
op
C
ot
N
o
D
Wonderware Training
Section 6 – Using Invoke Form Activity and Getting Data from a Form 4-81
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
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
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
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
y
op
C
ot
N
o
D
y
op
C
ot
N
o
D
Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-87
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
Use Input XML data and Output XML data for Invoke Form activity
Read form data in workflow
ot
N
o
D
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
y
op
6. Click Apply.
C
ot
The button name is updated.
N
o
D
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
9. Click Apply.
Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-91
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
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
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.
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
y
Information8
op
Assign Actor(s): Joe (Operator 1)
Information9
C
ot
N
o
D
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:
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
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
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
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
automatically selected. This variable contains the form data in XML format.
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
y
op
C
52. At the bottom-left of the window, in the third Output field, delete the @ symbols.
ot
N
o
D
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
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
Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-105
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.
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
Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-107
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
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.
Wonderware Training
Lab 13 – Using Invoke Form Activity and Reading Form Data in Workflow 4-109
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.
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.
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;
}
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
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
return UserInfo.Email;
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
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
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
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
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
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.
y
Approve and Reject buttons.
op
C
ot
187.Scroll down to Repair List.
N
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
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
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
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
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
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.
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.
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
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
y
op
C
ot
N
o
D
Wonderware Training
Lab 14 – Creating a Generic Table List 5-7
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
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
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.
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
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
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
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
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
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
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.
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
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.
Text Value
y
Line2 Line2
Line3 Line3
Line4 Line4
op
Line5 Line5
C
ot
N
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
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
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
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
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
y
op
C
ot
N
o
D
Wonderware Training
Section 2 – Existing Table List 5-29
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.
y
op
C
ot
N
o
D
Wonderware Training
Lab 15 – Creating an Existing Table List 5-31
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
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
Wonderware Training
Lab 15 – Creating an Existing Table List 5-33
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
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
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.
21. Click OK, and then close the Find and Replace dialog box.
22. In File Explorer, navigate to C:\Training\Scripts and open LAB-15 Example Script.
23. Copy the text under Script 1.
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
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
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
A message appears confirming that the list is successfully saved and a form associated with
the list is generated.
D
Wonderware Training
Lab 15 – Creating an Existing Table List 5-41
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
Text Value
Medium Medium
y
Large Large
op
C
ot
N
Wonderware Training
Lab 15 – Creating an Existing Table List 5-43
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
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
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.
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
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
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.
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.
Wonderware Training
Lab 15 – Creating an Existing Table List 5-49
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
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
Wonderware Training
Lab 15 – Creating an Existing Table List 5-51
y
op
C
102.Scroll to the right and check the column names and data.
ot
N
o
D
y
op
C
ot
N
o
D
Wonderware Training
Section 3 – Workflow Management Lookup 5-53
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
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.
Read-Only C
Select Yes to show the control.
Select No to hide the control.
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.
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
Note: The value must start with a letter in the alphabet and can contain only
alphanumeric characters.
D
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.
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.
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
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.
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
y
op
C
ot
N
o
D
Wonderware Training
Lab 16 – Reading Data Using a Workflow Management Lookup 5-59
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
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.
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
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
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
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
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
Wonderware Training
Lab 16 – Reading Data Using a Workflow Management Lookup 5-69
y
39. Test it with Fan.
op
40. Close the preview.
41. Publish the form and close it.
C
ot
N
o
D
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
Create a Variable
y
See Module 4, Section 6 for information on how to create a variable to read/hold database data.
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.
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
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.
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
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
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
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
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
Database
D
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
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
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
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
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
27. Under the Query Builder property, click the gray button to the right of the Enter Query field.
D
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
y
op
C
ot
N
o
D
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.
y
38. At the top-right of the window, click the Return Type drop-down list and select System.String.
op
C
ot
N
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
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
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
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
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
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.
. . . \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
y
op
C
ot
N
o
D
Wonderware Training
Lab 18 – Adding Information into a Workflow Management Log 6-25
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
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
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
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
Logger2
y
Description: Log Database Query Success for EPI Maintenance Form
op
C
ot
Now, you will continue configuring the Logger activities. You will first create a message for when
the query is successful.
N
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
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
30. In the Activity Properties pane, Configuration area, for the LogType property type, click the
Select Option drop-down list.
31. Select Information.
D
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
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
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
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
Wonderware Training
Lab 18 – Adding Information into a Workflow Management Log 6-35
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
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
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
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
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
y
Analyst's View
Progress View
Execution View
op
See Introduction to the Process Execution View for details.
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
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
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.
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
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
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
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
y
op
C
ot
N
o
D
Wonderware Training
Section 3 – Introduction to the Process Execution View 7-13
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
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.
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
y
op
C
ot
N
o
D
Wonderware Training
Section 4 – Introduction to Analyze Reports 7-19
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.
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
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
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
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
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
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.
Wonderware Training
Lab 19 – Working with Workflow Management Reports 7-25
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.
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
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.
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
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.
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
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
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
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
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
Wonderware Training
Lab 19 – Working with Workflow Management Reports 7-35
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
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
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
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 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
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.
C
Note: You cannot delete a package template that is marked as shipped.
Organize button to organize the package templates and group them in specific folders.
N
Wonderware Training
Section 1 – Packaging 8-5
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.
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
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.
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.
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
y
op
C
ot
N
o
D
Wonderware Training
Lab 20 – Creating, Exporting, and Importing a Package 8-9
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
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
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
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
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
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.
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.
y
op
C
ot
32. Click New , and then on the toolbar that appears, click Import .
N
Wonderware Training
Lab 20 – Creating, Exporting, and Importing a Package 8-17
y
op
36. Click Import.
A message appears that the package was imported successfully.
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
y
op
C
ot
43. Click Close.
All the files have been installed in the appropriate locations: the workflows were added to the
N
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
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.
y
op
C
ot
N
o
D
Wonderware Training