Activities
About an Activity
As a supervisor or an operator, you can use the Activities application in the Plant Applications Universal Client to add and perform activities associated with an event in the specified duration of a shift. For each activity, you can add values for only the supported Autolog variables available in the Plant Applications Administrator. The Autolog variables are measurements or calculations attached to a given production line and product values based on an event or time. Each Autolog variable is associated with an event.
Data type | Description |
---|---|
Integer | An array of integer numbers. |
Float | An array of floating-point numbers. |
Boolean | A logical entity that can have two values: true and false. |
String | A sequence of up to 25 characters. |
Comment | A comment variable. |
Custom | A user-defined data type. |
- Time-based: A time-based event is a generic term for an event that occurs at the scheduled time.
- Production-based: A production-based event is a generic term for a lot or batch. It represents the output of a given production line.
- User-defined: A user-defined event (UDE) is a generic, manually recorded event used to document important occurrences related to process operations.
- Product change: A product change event occurs when there is a product change on a Production Unit.
- Process order change: A process order change event occurs when the process order??for the associated Production Unit is set to Complete in the Plant Applications Administrator. Note: You cannot add a process order change event in the Activities application. You can only filter the activities associated with this event type.
Type | Description |
---|---|
Open | All activities that are yet to be performed or completed, or are in progress, are categorized as open activities. |
Completed | All activities that are completed or skipped are categorized as completed activities. |
- Time: Displays the time stamp when the activity was created.
- Product: Displays the product associated with the activity.
- Equipment: Displays the equipment associated with the activity.
- Process Order: Displays the process order, if available, associated with the activity.
About Creating an Activity
About the Plant Applications Administrator Settings
In the Plant Applications Administrator, you can group variables in a Display (the Autolog sheet) and add a title for each group of variables. You can also configure the Plant Applications Administrator to create activities corresponding to the titles of variable groups. In this case, the application creates as many activities as there are titles for variable groups in the selected Autolog sheet.
The activity created with an event appears in the Open page. For more information about accessing open activities, refer to the Access the Open Activities topic.
- When there are no variables configured in the Display associated with an Autolog sheet or a Production Unit and the Display type is not set to custom
- When the Display associated with an Autolog sheet or a Production Unit is configured to create activities with titles corresponding to the titles of variable groups, but the variable groups have the same title
- When the option to create activities is set to False in the Display associated with an Autolog sheet or a Production Unit
If the System Complete Activity On New Event option in the Plant Applications Administrator is enabled for the Display and you create an activity in the Plant Applications Universal Client whose product ID, process order ID, and unit ID match those of any existing activities, the existing activities are automatically set to complete. Depending on the number of such existing activities, the application might take some time to set all the activities as complete. You can then perform only the new activity that was last created.
In the Plant Applications Administrator, when the status of a production-based or user-defined event associated with the activity is set to a production status that has the Lock Event Data option enabled, then you do not have the privilege to modify the Autolog sheet for that event.
For more information about Plant Applications Administrator configurations for the Activities application, refer to the Proficy Plant Applications Help.
Add a Time-Based Event
Procedure
Results
Add a Production-Based Event
Procedure
Results
Add a User-Defined Event
Procedure
Results
Add a Product-Change Event
Procedure
Results
Access the Open Activities
Procedure
Access the Completed or Skipped Activities
Procedure
Filter an Activity
Procedure
- Log in to the Plant Applications Universal Client.
- Select .
- Select the tab for which you want to apply a filter.
- Select appearing next to the column name.
- As needed, select the applicable filter options, and then select Apply.
Results
To reset the filter options to their default setting, select , select Select All from the filter options, and then select Apply.
Search for an Activity
Procedure
Results
Complete an Activity
Procedure
Results
Modify the Value of an Autolog Variable
- When the status of a production-based or user-defined event associated with the activity is set to a production status that has the Lock Event Data option enabled, you do not have the privilege to modify the Autolog variables for that event.
- When the display associated with the activity has the LockUnavailableCells display option enabled, the users only in the Administrator security group with an Access Level other than Read can enter values for the modifiable Autolog variables that have no available data.
Procedure
Results
In the page displaying the Autolog history, all the Completed and Skipped activities appear. If you modify the value of an Autolog variable later for a completed or skipped activity in the page displaying the Autolog history, the Status of the activity does not change. However, based on the values entered or deleted for Autolog variables in an activity, the percentage completion of the activity is updated accordingly in the % Complete box in the Completed page.
Release an Activity
You can view the Release option for an activity only when the activity is yet to be completed. After you release an activity, you can perform or skip that activity.
Procedure
- Log in to the Plant Applications Universal Client.
- Select .
- Select the Open tab.
- For the activity you want to perform but it is yet to be completed, select Release.
Results
Skip an Activity
Procedure
Results
Access Existing Comments for an Activity
Procedure
Results
Add a General Comment for an Activity
Procedure
Results
Modify an Existing General Comment for an Activity
Procedure
Results
Delete an Existing General Comment for an Activity
Results
Add an Overdue Comment for an Activity
Procedure
Results
Modify an Existing Overdue Comment for an Activity
Procedure
Results
Delete an Existing Overdue Comment for an Activity
Procedure
Results
Add a Comment for a Variable
Results
The most recently added comment appears last in the comments list in the window for entering comments. The information about the user who added the comment and time stamp when the comment was added also appears for the comment.
Modify an Existing Comment for a Variable
Procedure
Results
Delete an Existing Comment for a Variable
Results
About Accessing a Custom Form
You can access a custom form for an activity in the Activities application. The custom form must be embedded in an external URL.
You must configure the Plant Applications Administrator to enable the use of custom forms for the display associated with the autolog sheet. For more information, refer to the Proficy Plant Applications Help.
To access the custom form and complete the associated activity, in the Activities page, select Perform for a new activity or In Progress for an ongoing activity. For more information, refer to the Complete an Activity topic.
- As a page: The URL of the custom form opens in a separate page.
- Embedded within the window displaying the autolog sheet: The custom form appears in an embedded pane in the window displaying the autolog sheet.Note: To view the custom form, in the window displaying the autolog sheet, select .
- As a replacement of the window displaying the autolog sheet: The custom form replaces the window displaying autolog sheet.
About Custom Forms
- Configure the URL of the custom form.
- Configure the Autolog sheets to generate custom form driven activities.
- Configure the user name and password for the user authentication of the custom form.
Data Flow
When you perform custom activities, you are redirected to the custom activity URL. In addition to the external URL, some additional information is sent as a POST MESSAGE that is a part of HTML5 Web Messaging specification. The following data flow diagram describes the interaction between the Activities application and the custom form to establish the connection and send data.
- The user performs a custom activity in the Activities application.
- The Activities application initiates the Handshake protocol by sending a message to the form and checks whether the URL of the custom form is valid or not.
- If the URL is valid, the Activities application receives the message back. The application then adds an event listener to hear from the origin and then posts the message with the variable data to the custom form.
- If the URL is not valid, a page not found 404 error message appears in the Activities application.
Post Data
window.postmessage()
method is used to send data from the Activities application to the custom form. The window.postmessage()
method enables cross-origin communication between the following items: - Window objects such as between a page and a window that the page spawned.
Example: The
window.postmessage()
method is used when you select the option to access the URL of the custom in a separate page. - A page and iframe such as between a page and an iframe embedded within the page.
Example: The
window.postmessage()
method is used when you select the option to access the URL of the custom form embedded within the window displaying the autolog sheet or as a replacement of the window displaying the autolog sheet.
window.postMessage()
method are exposed to the receiving window through the event object. The Activities application creates an instance of target window to post message by using the following syntax: targetWindow.postmessage(message, targetOrigin, [transfer]);
targetWindow
: A reference of the custom form window that receives the message.message
: Data to be sent to the custom form. The data is serialized using the structured clone algorithm. The algorithm enables you to pass a broad variety of data objects safely to the destination window without serializing them.targetOrigin
: The origin of target window. By default, asterisk (*) is set to indicate no preference. ThepostMessage()
transmits vital information. It is absolutely critical that this argument be a URI whose origin is the same as the intended receiver of the message containing the password to prevent interception of the password by a malicious third party.Transfer
: A sequence of transferable objects that are transferred with the message. An optional parameter not used in the Activities application.
Event Listener
window.addEventListener(???message???, receiveMessage, false);
function receiveMessage(event)
{
if (event.origin !== "http://example.org:8080")
return;
}
The properties of the dispatched message are: data (event.data)
: The information passed by the Activities application.origin
: The origin of the window that sent the message at the timepostMessage
was called. In the code snippet, thehttp://example.org:8080
is an example oforigin
.source
: A reference to the window object that sent the message. You can use this property to establish two-way communication between two windows with different origins.
Security Concerns
- If you do not expect to receive messages from other sites, disable the Activities application to add any event listeners for message events.
- If you expect to receive messages from other sites, always verify the sender's identity using the
origin
and possibly source properties. Any window (including a URL, for example,http://evil.example.com
) can send a message to any other window, and an unknown sender can send malicious messages. You must verify the syntax of the received message.Note: Failure to check theorigin
and possiblysource
properties enables cross-site scripting attacks. - Always specify an exact target origin, not an asterisk (*) in the Activities application configuration when you use
postMessage
to send data to other windows. A malicious site can change the location of the window without your knowledge. Therefore, the site can intercept the data sent usingpostMessage
.
Data Sent to a Custom Form
The data sent to custom form in the event.Data
object is in the JavaScript Object Notation (JSON) format. The following code sample shows the data sent to a custom form and the syntax to access the data.
{
"loggedUserInfo": {
"token": <<token>>
},
"header": {
"activityId": <<activityId>>,
"activityType": <<activityType>>,
"activityDescription": <<activityName>>,
"startTime": <<startTime>>
},
"productInfo": <<productId>>,
"processOrderInfo": <<processOrder>>,
"variableInfo": <<variable_data>>,
"activityStatusInfo": {
"statusId": <<Activity_statusId>>,
"status": <<Activity_status>>,
"readOnly": <<readOnly_status>>
},
"userConfigurationDetails": <<customActivityUser>>
}
loggedUserInfo
: Provides the user name and token. The UAA token is required when the custom forms use the public REST APIs provided to save variables into SOADB.Header
: Provides the activity ID, activity type as Production, Time-Based, or User-Defined, activity description, and start time of the activity.ProductInfo
: Provides the ID, name, and value of the product.ProcessOrderInfo
: Provides the ID, name, and value of the process order.Variables
: Provides the list of variables with ID, name, data type, and value.ActivityStatusInfo
: Provides information regarding whether the activity is locked, read-only state, or modifiable.userConfigurationDetails
: Provides the user name and password configured in Plant Applications.
Data Size
As a data point, the WebKit implementation (used by Safari and Chrome) does not currently enforce any limits regarding the size of the data sent through a message.
- Same domain: successful (same IP address)
- Cross domain: successful (with different IPs and ports, messages transfer between http and https)
- Data cannot be transmitted using form headers, form body, or query parameters by using
postmessage
. - All data is transmitted through
postmessage
only.