How can we update documents in ProjectWise via the API when the Rules Engine is active?

Hi,

We have a function to upload files to the ProjectWise data source and then sets attribute values ​​based on another DMS.
There is no problem uploading the first version of a file, updating with a new file and raising the version value also works well as long as there is no Workflow / Rules Engine that controls the flow.

But when the Rules Engine is used to control the flow we are unable to bump version etc. We would like to be able to adhere to the rules and trigger a Rule to do its thing via the API. We have looked in the documentation but unable to find out how this is done.

We do know how to get the current Workflow and Current State of the document but is there any additional information we need to find out?

As a workaround:

In data sources with Rules Engine, we checkout the file, then copy the newer file to the ProjectWise working directory and then check in to succeed to update file version.

aaApi_CheckOutDocument
aaApi_CheckInDocuments

This is fine, but we want to increase the version of the document at the same time.

So we've tried moving the file to a new version using ...

aaApi_SetDocumentState
and
aaApi_ChangeDocumentToNextState

 but then we receive an error message from ProjectWise...

“Manual version creation not allowed. Please use Workflow customization rules to create new document version.”

Anyone who knows if using the API can handle workflows to create a new version of a document?

In the ProjectWise interface, the Change State menu appears as shown in picture

Any help would be greatly appreciated!

/Per

Parents Reply
  • Hi Dave

    Thanks for your reply.

    However, it does not feel secure to bypass a rule.
    We do not want to end up in problems that our function may affect the data flow incorrectly.
    This could possibly be done on data sources where we have control of workflow etc. But our customers are Swedish authorities and other major companies and we have not found a way to read how Rules Engine is configured on the environment.
    We want be able to trigger Change State so that a new version of the document is created on the existing rule.
    So if I understand you right, this will not work through the API
    /Per
Children