Back Forward Harness forms
How to support work object copying

About Harness rules

 zzz Show all 

Follow these steps to allow users of your application to enter a new work object by copying information from an existing work object.

Through a model, you can control which properties in the existing work object are copied. (These instructions assume the harness rule is in the newer SmartFrames format.)

 zzz Add the Copy icon to the harness

You can offer work object copying in your application through a labeled button at the bottom of the work object form or through an icon on the header. Development steps are similar.

1. Open the harness form to be altered, such as Perform, Review, or Confirm.

2. Select CUSTOM as the Type.

3. Select an icon or enter text for a button label. The recommended icon is named iconCopy(Copy).

4. Select CopyWork for the Do Action field as the activity to execute when the icon or button is clicked.

5. Complete parameters for this activity. Enter the Purpose key part of the harness rule that is to appear for the new work object, such as New or NewCovered.

6. Select In Current Window as the place where activity results are desired. Do not select In Popup Window.

7. Complete the ToolTip text and other fields in the panel as desired. See Icons — Placing an icon in a layout cell.

8. Save the Harness form.

9. Optionally, create a model rule named pyCopyDefault in the work type of the objects to be copied. List all properties that are to be copied from the current work object to the new object. (These may or may not correspond to fields that users can enter or overtype.) Be careful not to copy values that are unique to a work object, such as the work object ID.

 zzz Results

When users click the Copy icon on a work object form, the application presents a copy. The user can enter data and submit the copy as another way to create a work object. The form for the original work object is closed (and locks on it are released; any unsubmitted changes are lost).

The new work object has the same work type as the original. Only one work object is covered. If the original work object is a cover, the new work object is also a cover, with no covered members.

The history of the new work object identifies the original work object, and the date and time of the copy.

If you don't create a model rule named pyCopyDefault, the standard model rule Work-.pyDefault is applied. This copies only pyLabel and pyDescription properties.

 zzz Advanced cases

If the model doesn't set a value for the pyFlowName property, the system starts the flow on the new work object recorded in the pyFlowName value of the original work object.

Your application can override the Work-.CopyWork activity to provide additional capabilities if needed by your application.

zzz About Harness rules