Adding Internal Custom Steps for On-Premises

A custom step is a very powerful tool that enables customers to make big changes to the flow. In addition to the normal Load/Convert/Save/Compare steps, you can insert a custom step anywhere after the Load step and before the Save step. This allows you to change the document before the document is passed on to the next step. Internal custom steps are also referred to as Java Custom Steps in Gateway.

Note: When you use an internal custom step, you have to be very careful not to disrupt other existing flow steps.

In the sample customization project, there is a sample custom step, SummarizePlannedCost, that does a very simple summarization. It adds up the PlannedCost of all of the ResourceAssignments in the project and puts it into a new UDF field of the project object. The new UDF field is the SummarizePlannedCost field. After performing this task, the custom step removes all ResourceAssignment elements from the document. A simple boolean type parameter controls whether the custom step is executed or not.

SummarizePlannedCost can be found under the com.mycompany.primavera.integration.custom.step package and it is defined in the following section in the customization.xml file:

<FlowDefinitionCustomization>

<FlowDefinitionName>Project Data</FlowDefinitionName>

<!-- <DisableCompare>true</DisableCompare> Uncomment this line to disable compare for this flow type -->

<FlowStep>

<Description>A sample custom step</Description>

<Name>Summarize Planned Cost</Name>

<OwnerAppName>P6</OwnerAppName>

<Sequence>15</Sequence>

<!-- to make sure it is inserted after Load step before the first convert step -->

<Type>Custom</Type>

</FlowStep>

...

</FlowDefinitionCustomization>

Notice that the sequence number that you set here determines when this step will get called. In this case, this step is inserted right after the P6 Load step.



Legal Notices | Your Privacy Rights
Copyright © 2013, 2022

Last Published Monday, January 31, 2022