Equipment Provisioning

Workflow provides an efficient and effective way to import large amounts of equipment data using your SQL Server.

All provisioning commands are inserted into the SOADB database table PR_EquipmentProvisioning.EquipmentProvisioning. When the provisioning process is executed, all commands are processed and moved to the PR_EquipmentProvisioning.EquipmentProvisioningResults table. The PR_EquipmentProvisioning.EquipmentProvisioningResults table indicates whether the command succeeded (status=0) or failed (status=1). If a command fails, the ErrorMessage column describes the error that was encountered.

You can start the provisioning process by directly executing the stored procedure [PR_EquipmentProvisioning].[usp_ProvisionEquipment] or by running the ProvisionEquipmentModel call method using a workflow.

Specifying the Equipment Hierarchy

For all commands, the full hierarchy must be provided for a given equipment instance. This is done using the Parent1, Parent2,..., Parent9 columns. Parent1 specifies the top level of the hierarchy (that is, enterprise), Parent2 specifies the second level (that is, site), and so on.

Note: A model of up to 10 levels is supported.

For example, if the command is operating on an Area equipment instance, you would specify the area name in the EquipmentName column, and provide the names of the parent enterprise and site in the Parent1 and Parent2 columns, respectively. If the command is operating on an enterprise equipment instance, then no parents are provided since an enterprise is at the top level.

Supported Commands

Specify the desired operation using the Command column. CommandId is internal and is generated automatically when a new record is inserted.

  • Create equipment instance - Command 1
    • Required Fields: EquipmentName, EquipmentType (see below for valid types), Parents
    • Optional Fields: EquipmentDescription
  • Delete equipment instance - Command 2
    • Required Fields: EquipmentName, Parents
  • Set property to a literal value - Command 3
    • Required Fields: EquipmentName, Parents, PropertyName, PropertyValue
  • Set a Historian tag link for a property - Command 4
    • Required Fields: EquipmentName, Parents, PropertyName, PropertyValue (the Historian tag name), HistorianServerName (the display name of the Historian in SOA)
      Note: The desired tag must already be synchronized to Workflow.
    Important: After executing Command 4, run the workflow described in the KB article 000036769 to trigger conditional events successfully. This workflow resolves a known limitation with the Equipment Provisioning feature, which allows to create historian tag links without subscribing to events. You can also manually link the historian tag to the equipment property. However, manual linking is not recommended for large data.
  • Add class to instance - Command 5
    • Required Fields:EquipmentName, Parents, EquipmentClassName
  • Add property to instance - Command 6
    • Required Fields: EquipmentName, PParents, PropertyName, PropertyDataType (see below for valid types), PropertyValue
    • Optional Fields: PropertyUnitOfMeasure, PropertyDescription

Valid Values for EquipmentType (nvarchar)

  • Enterprise
  • Site
  • Area
  • WorkCenter
  • ProcessCell
  • ProductionUnit
  • ProductionLine
  • StorageZone
  • WorkUnit
  • Unit
  • WorkCell
  • StorageUnit
  • EquipmentModule
  • ControlModule

Valid Values for PropertyDataType (int)

  • Boolean: 0
  • Byte: 1
  • DateTime: 3
  • Double: 4
  • Single: 5
  • GUID: 6
  • SByte: 7
  • Int16: 8
  • Int32: 9
  • Int64: 10
  • String: 11
  • UInt16: 12
  • UInt32: 13
  • CustomPropertyType: 18
  • Nullable Integer: 19
  • Nullable Double: 20

Customizing Timeouts

By default, the equipment provisioning process will time out if the processing time exceeds 10 minutes. For very large numbers of commands (tens of thousands), this may be insufficient time, so the provisioning does not complete. If necessary, the timeouts can be adjusted by editing the ProficyServer.exe.config file.

The following appSetting can be added inside the <appSettings></appSettings> elements (the value is the timeout in seconds):

<add key="EquipmentProvisioningTimeout" value="1200"/>

If a value greater than 10 minutes is used, the WCF timeout must also be adjusted higher than the default 10 minutes.

<add key="OperationTimeoutSeconds" value="1200"/>

Limitations of Property Data Links

The equipment provisioning process supports:

  • Links to Historian tags only.
  • Current value links only. Any advanced query configurations must be done using Workflow client.
  • Viewing and testing links in Workflow client that were created with this process. If you attempt to edit the link, it does not select the data item in the data item browser by default. This is because these links are created by a different mechanism than default data items.