proficy* workflow - kerrco .if adam is not installed in favour of a local directory, then the...

Download Proficy* Workflow - Kerrco .If ADAM is not installed in favour of a local directory, then the Proficy

Post on 06-Aug-2018

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Proficy* Workflow Powered by Proficy SOA

    BEST PRACTICES

    Version 1.1 May 2011

  • All rights reserved. No part of this publication may be reproduced in any form or by any electronic or mechanical means, including photocopying and recording, without permission in writing from GE Intelligent Platforms, Inc.

    Disclaimer of Warranties and Liability

    The information contained in this manual is believed to be accurate and reliable. However, GE Intelligent Platforms, Inc. assumes no responsibilities for any errors, omissions or inaccuracies whatsoever. Without limiting the foregoing, GE Intelligent Platforms, Inc. disclaims any and all warranties, expressed or implied, including the warranty of merchantability and fitness for a particular purpose, with respect to the information contained in this manual and the equipment or software described herein. The entire risk as to the quality and performance of such information, equipment and software, is upon the buyer or user. GE Intelligent Platforms, Inc. shall not be liable for any damages, including special or consequential damages, arising out of the use of such information, equipment and software, even if GE Intelligent Platforms, Inc. has been advised in advance of the possibility of such damages. The use of the information contained in the manual and the software described herein is subject to GE Intelligent Platforms, Inc. standard license agreement, which must be executed by the buyer or user before the use of such information, equipment or software.

    Trademarks

    2010, GE Intelligent Platforms, Inc. All rights reserved. * Trademark of GE Intelligent Platforms, Inc. All other brands or names are property of their respective holders. Any other trademarks referenced herein are used solely for purposes of identifying compatibility with the products of GE Intelligent Platforms, Inc.

    Notice

    GE Intelligent Platforms, Inc. reserves the right to make improvements to the products described in this publication at any time and without notice. We want to hear from you. If you have any comments, questions, or suggestions about our documentation, send them to the following email address:

    doc@ge.com

  • Table of Contents

    i

    Table of Contents Installation _______________________________________ 1

    ADAM 1 Workflow Performance _____________________________ 2

    Persistence 2 Memory 4 Tracking Configuration 5 Subprocesses 6 Activities 8

    Start Workflow and Start Schedule 8 While and ForEach 8 Write 9 If/Else 11 Form Events 12

    Forms ___________________________________________ 13 Workflow Customization ____________________________ 15

    Using Existing .NET Libraries 15 Custom Proficy Service 15 Custom Workflow Activity 17 Call from Code Activity 18

  • Installation

    1

    Installation

    ADAM

    If ADAM is not installed in favour of a local directory, then the Proficy Publisher service does not need to run.

  • 2 Proficy* Workflow

    Workflow Performance

    This section provides more information about some features, and contains suggestions for improving the performance of your workflows.

    NOTE: Each recommendation is rated HIGH, MEDIUM, and LOW to indicate the level of importance and impact on your workflow.

    Persistence

    Overview

    The execution engine records internal tracking data that includes the state information associated with a running workflow instance. The execution engine persists the workflow instance state when a subprocess completes. The persisted state can be used to recover and restart a workflow instance from failure conditions, or if it was stopped. If a workflow is stopped normally, the postsubprocess, postprocess, and unload steps run before the instance stops (they will not run if the server crashes). The workflow instance can continue from the start of the current subprocess by using the restart command. When this happens, the instance restarts by running the load, preprocess, and presubprocess steps. Then it restarts at the beginning of the subprocess that was running before the workflow stopped.

    You can significantly improve the performance of your workflow by implementing one or all of the following recommendations:

    Disable persistence (HIGH)

    Decrease the number of persistence points (MEDIUM)

    Reduce activities (HIGH)

  • Workflow Performance

    3

    Disabling Persistence

    Recommendation (HIGH): Disable persistence if you do not need instances of the workflow to recover after a server restart.

    Workflows are automatically configured to have persistence enabled, saving the current state of the instance to the Workflow database. This save process is a slow operation, impacting workflow performance as it moves from one subprocess to the next. This process is also CPU-intensive, so it can have a negative impact on the performance of other running workflow instances.

    Decreasing Persistence Points

    Recommendation (MEDIUM): Decrease the number of persistence points in a workflow by reducing the number of subprocesses.

    If you choose to enable persistence, use as few subprocesses as possible. Since the workflow instance state is saved after each subprocess completes, unnecessary subprocesses can negatively impact the performance of the instance and any other running workflow instances.

    Reducing Activities

    Recommendation (HIGH): Reduce the number of activities in a workflow.

    A persisted workflow saves the state of all workflow objects. Reducing the number of activities in a workflow decreases the time needed to save the workflow instance state.

  • 4 Proficy* Workflow

    Memory

    Overview

    Workflows consume memory at run time, and all objects that are part of that workflow contribute to that memory consumption.

    You can significantly improve the performance of your workflow by implementing one or all of the following recommendations:

    Reduce concurrent workflow instances (MEDIUM)

    Reduce activities (MEDIUM) Reducing Concurrent Workflow Instances

    Recommendation (MEDIUM): Reduce the number of concurrently running workflow instances.

    Every running workflow instance consumes a significant amount of server memory, even if they are instances of the same workflow definition. For example, if you have several background workflow instances that run periodically and have similar logic, combine them into a single workflow instance.

    Reducing Activities

    Recommendation (MEDIUM): Reduce the number of activities in a workflow.

    Each activity in a workflow uses memory at run time, including the execution state of all properties, parameters, and local variables.

  • Workflow Performance

    5

    Tracking Configuration

    Overview

    You can track workflow, subprocess, and/or schedule data while a workflow is running.

    On a workflow or schedule, the system records task data for the corresponding workflow instances. It can be used to generate reports on historical data, such as task and task step durations, expiry, and performing user/location. It also allows a user of the Task List display to view previously completed tasks.

    On a subprocess, specific local variables can be tracked. These variables are tracked to relate tasks to data in other models in the reporting database.

    You can significantly improve the performance of your workflow by implementing one or all of the following recommendations:

    Disable tracking (MEDIUM)

    Track at the appropriate levels (MEDIUM)

    Select a minimal set of tracked local variables (LOW) Disabling Tracking

    Recommendation (MEDIUM): Disable tracking for a workflow or schedule if you do not need task instance history for the Task List display or reporting.

    If tracking is enabled, then task data is saved at certain points to the workflow database. This process impacts the execution speed of the workflow.

  • 6 Proficy* Workflow

    Tracking Appropriate Levels

    Recommendation (MEDIUM): Enable tracking at the appropriate level.

    Tracking at both the process and subprocess levels results in task data being saved more often. Therefore, to improve performance, ensure you are tracking at the appropriate levels:

    process level if historical task step data is not required

    subprocess level to view a workflow's task history in the Task List display

    Selecting Local Variables to Track

    Recommendation (LOW): Select a minimal set of local variable for tracking.

    In a subprocess, you can include specific local variables in the tracking data to relate tasks to other data. For example, you can track a work request ID in a local variable for relating task data with a corresponding work request. As a result, the number of local variables that are tracked impacts performance.

    Subprocesses

    Overview

    A subprocess is part of a user-defined process in a workflow, and a workflow must be constructed of one or more subprocess. Each subprocess is a self-contained entity where the majority of the logic is added to run a workflow. Subprocesses group a set of related activities in a workflow and appear as a single task step. They allow you to create a series of steps to accomplish a task, assignment, event-driven, or activated process. The contents of a subprocess consist of activities that can be placed in any order depending on the requirement.

  • Workflow Performance

    7

    You can also make a subprocess global, which allows you to develop and store standard and frequently used subprocesses to be reused in various workflows.

    Note: When any global resource, such as a subprocess or us

Recommended

View more >