STEP Execution

OIEP Delivery Plugin

Once the needed Companion for integration STEP extension is installed on your STEP system, you can configure your OIEP Delivery Plugin :

Configure database connection

The parameters for each extension are described in the Configuration section.

Export from Web UI

It is possible to use Companion for integration to generate complex Excel exports (such as FAB-DIS) directly from STEP WebUI.

Companion for Integration

This is done using a workflow, workflow variables and a business rule plugin:

  • create a new objet type that will be pushed onto the workflow
  • create a new asset type that will hold the resulting file
  • create a workflow and a state with the transitions bgp.succeeded and bgp.failed

Export workflow

  • add the workflow variables AssetId and BGPId
    • AssetId is the STEP asset that will hold the generated file
    • BGPId is used to retrieve the exported STEPXML file
  • add a business action for the on entry of this state to start the export from STEP
var parameters = new com.stibo.exportservices.descriptor.ExportServiceDescriptor.Parameter();
parameters.configurationID = exportConfigId;
parameters.nodeURLs = nodeUrls;
var bgp = currentTask
  .startBackgroundProcess(
     com.stibo.exportservices.descriptor.ExportServiceDescriptor,
     parameters,
     "Started from Workflow");
workflowInstance.setSimpleVariable("AssetId", exportPortalAssetId);
workflowInstance.setSimpleVariable("BGPId", bgp.getID());

where:

exportConfigId: the export configuration ID to use (STEPXML)
exportPortalAssetId: the asset ID that will hold the generated file, can be JSON, EXCEL or CSV
nodeurls: an array of object STEP URLs to export, they can be retrieved from the list of selected objects in the WebUI (WebUIBindContext)
  • create a business action for the on entry of the state pointed by transition bgp.succeeded to start the conversion
<BusinessPlugin BusinessRulePluginID="fr.cantor.c4i.C4IFile">
    <Parameters>
        <Parameter ID="assetVariableID" Type="java.lang.String">AssetId</Parameter>
        <Parameter ID="bgpVariableID" Type="java.lang.String">BGPId</Parameter>
        <Parameter ID="configurationAsset" Type="java.lang.String">c4i.yaml</Parameter>
        <Parameter ID="includeEmptyTabs" Type="java.lang.String">false</Parameter>
        <Parameter ID="licenseAsset" Type="java.lang.String">c4i.license</Parameter>
        <Parameter ID="outputFormat" Type="java.lang.String">EXCEL</Parameter>
        <Parameter ID="configType">STATIC</Parameter>
    </Parameters>
</BusinessPlugin>

where

c4i.yaml: the companion for integration YAML asset ID
c4i.license: the companion for integration license asset ID
  • add a button in the WebUI that trigger a business action creating a new objet and push it in the workflow

WebUI button

  • the resulting file will be uploaded onto AssetId, it may be a text file if an error occurs
  • for Excel files, a template must be created in STEP as an asset of type C4I-TemplateType and approved in order to be available by the plugin
    • for instance the following YAML file
- Product:
    products/Tech. Att. per Product[Product STEP ID]:
      - ../../@ID: Product STEP ID
      - ../../Name/text(): Name
      - ./@AttributeID: Att Tech ID
      - normalize-space(c4i:if(local-name()='Value', concat(text(), " ", c4i:resolveUnitLabel(string(@UnitID))), c4i:join(Value/text(), "|"))): Value

makes reference to the template products.xlsx, the sheet Tech. Att. per Product and the columns with header Product STEP ID, Name, Att Tech ID and Value.

template header

template sheet

template result

Empty result output

By default, when C4I does not produce an output, no content is uploaded to the asset.

If you wish to have a default content uploaded to the asset when no output is produced, the parameter emptyOutputAsset allows you to specify the ID of an asset whose content will be uploaded into the resulting asset.

Dynamic configuration asset

To supply the YAML configuration asset, two methods can be used :

  • With the parameter configType set to "STATIC", specify the ID of the asset in the parameter configurationAsset
  • With the parameter configType set to "DYNAMIC", specify the ID of a workflow variable in the parameter configurationAsset
    • During the execution, C4I will fetch the ID of the configuration asset from this workflow variable
    • This workflow variable needs to be dynamically set before running the export
Last Updated: