cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Workflow definition

Former Member
0 Kudos

Hi Experts.

I'm trying to redefine the workflow process . I have included a new approver . but when trying to upload the new definition gettign error as " The attached XPDL file does not contain a workflow process." Any one pls suggest me on this error

Thanks in advance

Deepika

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Deepika,

My understanding is you have uploaded a new XPDL in workflow definition.

step 1-But after this you need have to corelate this with Project Configurable Phase Definition or Contract Document Phase Configuration based on the type of workflow approval you need to work on.

step 2-After this you to associate it with project type or contract document type.

step 3-Then while you create a RFX or MA or any other activity can choose the name from step2.

Hopefully after this it will not throw any error on your newly created XPDL.

Let me know if you face any issues after following ths steps.

More over just verify whether you are adding correct approvers or not as XPDL (script you are writing) will pick the approver details.

Regards

Jagmohan

Edited by: JPadhy on Jun 8, 2010 9:07 AM

Former Member
0 Kudos

Hi Jagmohan ,

Thanks for your reply . We have already defined 'X' approval in workflow definition . It includes 3 approvers being picked upon added by the user on a contract creation . now I'm trying to add one more approver .. trying to get the new approver and add to the list . when trying to upload with newly added approver fro mwrokflow defintion of 'X' approval phase getting error as file does not contain workflow process. I'm new to this workflow scripting . can you pls suggest me the better way to resolve the issue

Thanks in Advance,

Tayi

Former Member
0 Kudos

Hi Deepika,

It seems there can be two problems;

1) There is some problem in the script itself. As you mentioned you already added the approver may be it is not addding a desired manner( throwing file does not contain workflow process). If you could share the cript with me i can be able to guide you through.

2) Let me know from where it is getting the user credentials (approver information) whether fromthe backend or u have defined a structure in companies list.

Or else Uploading with the new XPDL may be a problem (just crosscheck if you have uploaded the right XPDL or not)

I hope these following in these lines can resolve the issue.

Best Regards

Jagmohan

Former Member
0 Kudos

Hi Jagmohan ,

I'm trying to add sourcing Advisor for the current approval list . We will be including in agreement . It iwll chekc and get the approver name from the comapny list we defined in the application . can you pls check it if i did any mistakes

// Create a logger for debugging purposes

//

log = Logger.createLogMessage(session);

// FUNCTION: Log an informational message

//

logInfo(msg) {

log.setLogMessage(msg);

Logger.info(log);

}

// FUNCTION: Log an error exception

//

logError(e) {

log.setException(e);

Logger.error(log);

}

// FUNCTION: Get the Parent Document

//

getParentAgreement(contractDoc) {

// Get the parent

//

if (doc.getParentIBean() != null) {

parent = doc.getParentIBean();

}

if (parent == null) {

cancelProcess("Could not retrieve the Parent Agreement.");

return null;

}

return parent;

}

logInfo("Main Approval Prescript Start");

// Set the approval rule type. Can be ANY or ALL.

//

import com.frictionless.doc.collaboration.CollaboratorApprovalRule;

RULE_TYPE = CollaboratorApprovalRule.ALL;

// Get the parent agreement in edit mode

//

parent = getParentAgreement(doc);

if (parent == null) {

logInfo(" ... ERROR Could not access the Parent Agreement");

return ;

}

// FUNCTION: Adds a single approver using the name as a description for the

// log file output

//

import com.frictionless.api.doc.collaboration.CollaboratorApprovalRuleType;

addSingleApprover(principal, name) {

if (hasValue(principal)) {

addApprover(principal, new CollaboratorApprovalRuleType(RULE_TYPE));

logInfo(" ... Added " + name + ": " + principal.getDisplayName());

} else {

logInfo(" ... " + name + " was not set");

}

}

// Add the Business Owner

//

addSingleApprover(parent.getExtensionField("MED_BUSINESS_OWN").get(), "Business Owner");

// Add the Dept VP

//

addSingleApprover(parent.getExtensionField("MED_VP_DEPT_HEAD").get(), "Department VP");

// Add the BST adviser

//

addSingleApprover(parent.getExtensionField("MED_BST_ADVISOR").get(), "BST Advisor");

// Add the Contract Advisor

//

addSingleApprover(parent.getExtensionField("MED_CONT_AD").get(), "Contract Advisor");

// Add the Sourcing Advisor

//

addSingleApprover(parent.getExtensionField("MED_SOURCE_ADVISOR").get(), "Sourcing Advisor");

// Add other approvers from a collection

//

for( other : parent.getExtensionCollection("MED_OTH_APP_COLN").iterator()) {

addSingleApprover(other.get("MED_OTH_APP_COLL"), "Other Approver");

}

// Add other approvers from a collection

//

for( other : parent.getExtensionCollection("MED_NEGOTIAT_COLN").iterator()) {

addSingleApprover(other.get("MED_NEGOTIAT_COLL"), "Negotiation Approver");

}

logInfo("Main Approval Prescript End");

Former Member
0 Kudos

Hi Deepika,

The code, to me, looks fine.. just verify; the MED_SOURCE_ADVISOR whether it is correct in DB or not...

addSingleApprover(parent.getExtensionField("MED_SOURCE_ADVISOR").get(), "Sourcing Advisor");

Now there can be two ways you can add another approver;

1) By creating one more box in XPDL and putting a script in tht (if it needs to be approved after all the 3 approvers approves, as the name source advisor suggests)...

so it will look like Box1(all the three approvers)-->Box2(will contain code for supervisor approver)--> END

2)Or create a separate XPDL all together with supervisor approver only and add it to the phase configuration.

Either of these two ways can reach to your destination,...

Regards

Jagmohan

Former Member
0 Kudos

Hi Jagmohan ,

Thansk for your analysis . I tired out just by saving the file after valid changes . On tryign to hit Save as .. hope file is getting corrupted .Issue got resolved. .

Thanks for your help

Tayi