Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Info
titleNote

Please follow the documentation on how to create a client-side connection to use the Governance API before following these examples.

Lifecycle transition operations of the Governance API can be used to do the Lifecycle operation of the artifacts. These operations are available with all artifacts available in Governance Registry like Services, WSDLs, Schemas, Policies, GenericArtifacts and GovernanceArtifacts. Following The following is the list of Lifecycle transition operations available with the Governance API.

 

  1. Associating a Lifecycle to an Artifact
  2. Checking Associated Lifecycle Name of an Artifact
  3. Checking the Current State of the Lifecycle Associated with the Artifact
  4. Get the Checklist Item List
  5. Checking Checklist Item
  6. Checking Whether a Checklist Item is Checked
  7. Unchecking Checklist Item
  8. Get Voting Event List
  9. Voting for an Event
  10. Checking Whether the Current User Already Voted for an Event
  11. Unvoting for an Event, Current User Already Voted
  12. Get all Action List
  13. Invoking Actions

Associating a Lifecycle to an Artifact

This method is used to associate a Lifecycle to an artifact. If you want to know about creating a Lifecycle please refer this.

 

See here for more information on Lifecycles and their creation.

Code Block
artifact.attachLifecycle(lifecycleName);

"lifecycleName" is the name of the Lifecycle which the artifact need to associate with.

...

Code Block
artifact.checkLCItem(checkListItemIndex);

"checkListItemIndex" is the index of the checklist name on the checklist items list returned by the artifact.getLCCheckListItemNames() method.

Checking Whether a Checklist Item is Checked

...

Code Block
boolean lcItemChecked = artifact.isLCItemChecked(checkListItemIndex);

"checkListItemIndex" is the index of the checklist name on the checklist items list returned by the artifact.getAllCheckListItemNames() method.

Unchecking Checklist Item

...

Code Block
artifact.uncheckLCItem(checkListItemIndex);

"checkListItemIndex" is the index of the checklist name in the checklist items list returned by artifact.getAllCheckListItemNames() method.

Get Voting Event List

This method is used to get the event list which needs a certain amount of votes before it invokeis invoked.

Code Block
String[] votingEvents = artifact.getAllVotingItems();

...

Code Block
artifact.vote(eventIndex);

Here "eventIndex" is the index of the voting event in the voting events list returned by artifact. artifact.getAllVotingItems() method.

Checking Whether the Current User Already Voted for an Event

This method is used to check whether the current user is has already voted to on an event.

Code Block
boolean currentUserVoted = artifact.isVoted(eventIndex);

"eventIndex" is the index of the voting event in the voting events list returned by artifact. artifact.getAllVotingItems() method.

Unvoting for an Event, Current User Already Voted

...

Code Block
artifact.unvote(eventIndex);

"eventIndex" is the index of the voting event in the voting events list returned by artifact. artifact.getVotingItems() method.

Get all Action List

...