Process Template
The following template accepts a collection of UFIDs, processes them for export, and creates a jar file. The rest is left to your customization. Before step-1 (Generate Sync Package), we assume that some customization will be required based on changes in Windchill, and that the UFIDs of updated objects are collected. These objects are then passed to Step-1 as input parameters. Step-3 (Windchill Acknowledgement) does nothing more than the regular ‘Windchill Acknowledgement’ task. A likely approach would be to have a customization on the Windchill side that makes use of the input parameters successful and unsuccessful UFIDs information and consume their business logic.
Step 1: Generate a Sync Package
<steps order="0">
<name>Generate Sync Package</name>
<input type="java.lang.String" required="true">PROCESS_ID</input>
<input type="java.lang.String" required="false">CONSTRUCTION_Number</input>
<input type="java.lang.String" required="false">UFIDS</input>
<input type="java.lang.String" required="false">UFIDS_FILE</input>
<output type="java.io.File" required="false">EXPORTED_JAR</output>
<output type="java.lang.String" required="true">STEP_STATUS</output>
<output type="java.lang.String" required="true">PROCESS_ID</output>
<output type="java.lang.String" required="true">CONSTRUCTION_NUMBER</output>
</steps>
This step accepts a process id, construction number, UFIDs (in string format), UFIDs file (absolute file path) in a string format.
The output of this step is an exported jar that is used as an input to next step.
• This step fetches a list of UFIDs from the field UFIDS or UFIDS_FILE.
• Creates a UFID object.
• Fetches a corresponding object.
• If an object is not found for the corresponding UFID object, a warning is presented.
• It creates a jar for exported objects.
• STEP_STATUS is set according to step success/failure.
Input Argument Description
PROCESS_ID
• Identifies the process.
• Accepts a string value.
• It is mandatory.
CONSTRUCTION_NUMBER
• Used by FORAN Import per their requirement. Facilitating its use in this template.
• An optional argument.
• Accepts a string value.
UFIDS
• Accepts a list of comma-separated UFIDs and/or OIDs
• Input accepted in a string format.
UFIDS_FILE
• Accepts an absolute file path in string format.
• Value must be a valid file path.
• File contains a list of UFIDs and/or OIDs. Either one UFID or OID per line or a list of UFIDs and/or OIDs separated by commas.
|
One of the arguments (either UFIDS or UFIDS_FILE) is mandatory. If neither are provided, then the job presents an exception. If both are provided, then priority is given to UFIDS_FILE.
|
Output Argument Description
EXPORTED_JAR
• A jar of exported objects that are selected for the export process.
• Argument is of type File.
• Used by the FORAN Import process to synchronize updates from Windchill.
STEP_STATUS
• The status of a specific step.
• Holds a value of either ‘SUCCESS’ or ‘FAILURE’.
• Used to verify the status of a step previously run.
PROCESS_ID
• Same as input argument description.
CONSTRUCTION_NUMBER
• Same as input argument description.
Step 2: FORAN Import
<steps order="1">
<name> FORAN Import</name>
<input> type="java.lang.String" required="true">PROCESS_ID</input>
<input> type="java.lang.String" required="false">CONSTRUCTION_NUMBER</input>
<input> type="java.lang.String" required="true">PREV_STEP_STATUS</input>
<input> type="java.io.File" required="false">JAR_TO_IMPORT</input>
<output> type="java.lang.String" required="true">STEP_STATUS</output>
<output> type="java.lang.String" required="true">PROCESS_ID</output>
<output> type="java.io.File" required="false">SUCCESSFUL_UFIDS</output>
<output> type="java.io.File" required="false">UNSUCCESSFUL_UFIDS</output>
This step accepts a process id, construction number, previous step status, and import jar. The output of this step is step status, process id, successful UFIDs file, and unsuccessful UFIDs file.
|
It is assumed that this important step is configured and implemented by FORAN.
|
Input Argument Description
PROCESS_ID
• Same as step 1 input argument description.
• This argument is linked to the output argument (Process ID) of step 1 (Generate Sync Package).
CONSTRUCTION_NUMBER
• Same as step 1 input argument description.
• This argument is linked to the output argument (CONSTRUCTION_NUMBER) of step 1 (Generate Sync Package).
PREV_STEP_STATUS
• The status of the previous step.
• This argument is linked to the output argument (STEP_STATUS) of step 1 (Generate Sync Package).
JAR_TO_IMPORT
• Argument is of type File.
• This argument is linked to the output argument (EXPORTED_JAR) of step 1 (Generate Sync Package).
• This is the jar that FORAN Import uses to import objects that were exported in an earlier step from Windchill.
Output Argument Description
STEP_STATUS
• Same as step 1 output argument description.
PROCESS_ID
• Same as step 1 input argument description.
SUCCESSFUL_UFIDS
• A list of UFIDs that were successfully imported by FORAN.
• Argument is of type File.
UNSUCCESSFUL_UFIDS
• A list of UFIDs that were unsuccessfully imported by FORAN.
• Argument is of type File.
Step 3: Windchill Acknowledgement
<steps order="2" failedStep="true">
<name>Windchill Acknowledgement</name>
<input type="java.lang.String" required="true">PROCESS_ID</input>
<input type="java.lang.String" required="true">PREV_STEP_STATUS</input>
<input type="java.io.File" required="false">SUCCESSFUL_UFIDS</input>
<input type="java.io.File" required="false">UNSUCCESSFUL_UFIDS</input>
<output type="java.lang.String" required="false">STEP_STATUS</output>
</steps>
This step accepts inputs of process id, previous step status, successful UFIDs file, and unsuccessful UFIDs file (the outputs of step-2). The output of this step is the step status.
Input Argument Description
PROCESS_ID
• Same as step 1 (PROCESS_ID) input argument description.
• This argument is linked with the output argument (PROCESS_ID) of step 2.
PREV_STEP_STATUS
• The status of the previous step.
• This argument is linked with the output argument (STEP_STATUS) of step 2.
SUCCESSFUL_UFIDS
• A list of UFIDs that were successfully imported by FORAN.
• This argument is of type File.
• This input argument is linked with the output argument (SUCCESSFUL_UFIDS) in step 2.
UNSUCCESSFUL_UFIDS
• A list of UFIDs that were unsuccessfully imported by FORAN.
• This argument is of type File.
• This input argument is linked with the output argument (UNSUCCESSFUL_UFIDS) in step 2.
Output Argument Description
STEP_STATUS
• The status of this step.
• The value is either ‘SUCCESS’ or ‘FAILURE’.