on 07-21-2011 9:37 AM
Hi All,
We have got new Sourcing Server7.0 and uploded Master Data. After that I have created one Project and attached workflow. I'm trying to achieve 1 step approval in the project(3 phase:- Draft,Approval,Approved).
When I'm changing the phase from Draft to Approval, document got locked but not going to approver user for approval. In the XPDL prescript below logic is present:-
import com.frictionless.api.common.exception.*;
import com.frictionless.api.common.log.Logger;
import com.frictionless.api.common.platform.*;
import com.frictionless.api.common.types.*;
import com.frictionless.api.doc.collaboration.*;
import com.frictionless.api.doccommon.masterdata.*;
import com.frictionless.api.ibean.*;
import com.frictionless.api.util.*;
import com.frictionless.api.workflow.*;
import com.frictionless.api.projects.*;
import com.frictionless.api.common.log.*;
import com.frictionless.api.ibean.*;
import com.frictionless.api.usermgmt.masterdata.*;
import com.frictionless.api.doc.collaboration.*;
import com.frictionless.api.doccommon.doc.contract.*;
// Add the project approver from the collaborator collection
// Get the default collection "COLLABORATORS"
collaboratorsCollection = doc.getCollectionMetadata("COLLABORATORS").get(doc);
// Check if collaborators collection's size is greater than zero.
if (collaboratorsCollection.size() > 0)
{
// Iterate over the collection.
for (int i = collaboratorsCollection.size() - 1; i >= 0; --i)
{
// Get collection member
collaboratorsCollection_member = collaboratorsCollection.get(i);
// Check if member has value.
if (hasValue(collaboratorsCollection_member))
{
// Get the collaboration role of the collection member.
collaboratorRole = collaboratorsCollection_member.getCollaboratorRole().getDisplayName();
// Get approver of Role "Buyer contractor hiring".
if(collaboratorRole.equals("Buyer contractor hiring"))
{
principal = collaboratorsCollection_member.getPrincipal();
}
}
}
}
// Create a logger for messaging
logMsg = Logger.createLogMessage(session);
if (hasValue(principal))
{
// Add the user account as the approver
addApprover(principal);
// log details
logMsg.setLogMessage("Added user: " + principal.getDisplayName() + " as approver");
Logger.info(logMsg);
}
I'm getting below error:-
Sourced file: inline evaluation of: ``import com.frictionless.api.common.exception.; import com.frictionless.api.com . . . '' : Attempt to resolve method: createLogMessage() on undefined variable or class name: Logger : at Line: 43 : in file: inline evaluation of: ``import com.frictionless.api.common.exception.; import com.frictionless.api.com . . . '' : Logger .createLogMessage ( session )
at bsh.UtilEvalError.toEvalError(Unknown Source)
at bsh.UtilEvalError.toEvalError(Unknown Source)
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHAssignment.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at com.sap.odp.comp.scripting.ScriptEnvironment.execute(ScriptEnvironment.java:144)
at com.sap.odp.workflow.engine.handlers.PhaseChangeInstantiationRequestHandler.
Please let me know If i need to place any jar file in Server coz error is coming for few import files.
Thanks!!!
Edited by: Deepak Arora on Jul 21, 2011 11:27 AM
Issue solved...i have replaced the import line with the api info of Sourcing version-7.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.