Search in sources :

Example 1 with WorkflowAdminServiceWorkflowException

use of org.wso2.carbon.identity.workflow.mgt.stub.WorkflowAdminServiceWorkflowException in project product-is by wso2.

the class UserApprovalTestBase method getWorkflowDTO.

private WorkflowWizard getWorkflowDTO(String workflowName, String workflowDescription) throws RemoteException, WorkflowAdminServiceWorkflowException {
    WorkflowWizard workflowDTO = new WorkflowWizard();
    workflowDTO.setWorkflowName(workflowName);
    workflowDTO.setWorkflowDescription(workflowDescription);
    workflowDTO.setTemplateId(templateId);
    workflowDTO.setWorkflowImplId(workflowImplId);
    Template template = client.getTemplate(templateId);
    workflowDTO.setTemplate(template);
    WorkflowImpl workflowImpl = client.getWorkflowImpl(templateId, workflowImplId);
    workflowDTO.setWorkflowImpl(workflowImpl);
    Parameter[] parametersImpl = new Parameter[2];
    Parameter parameter = new Parameter();
    parameter.setParamName("BPSProfile");
    parameter.setParamValue("embeded_bps");
    parameter.setHolder("WorkflowImpl");
    parameter.setQName("BPSProfile");
    parametersImpl[0] = parameter;
    parameter = new Parameter();
    parameter.setParamName("HTSubject");
    parameter.setParamValue("sample approval task");
    parameter.setHolder("WorkflowImpl");
    parameter.setQName("HTSubject");
    parametersImpl[1] = parameter;
    Parameter[] parametersTmp = new Parameter[1];
    parameter = new Parameter();
    parameter.setParamName("UserAndRole");
    parameter.setParamValue("admin");
    parameter.setHolder("Template");
    parameter.setQName("UserAndRole-step-1-roles");
    parametersTmp[0] = parameter;
    workflowDTO.setTemplateParameters(parametersTmp);
    workflowDTO.setWorkflowImplParameters(parametersImpl);
    return workflowDTO;
}
Also used : WorkflowImpl(org.wso2.carbon.identity.workflow.mgt.stub.metadata.WorkflowImpl) Parameter(org.wso2.carbon.identity.workflow.mgt.stub.bean.Parameter) WorkflowWizard(org.wso2.carbon.identity.workflow.mgt.stub.metadata.WorkflowWizard) Template(org.wso2.carbon.identity.workflow.mgt.stub.metadata.Template)

Example 2 with WorkflowAdminServiceWorkflowException

use of org.wso2.carbon.identity.workflow.mgt.stub.WorkflowAdminServiceWorkflowException in project product-is by wso2.

the class WorkflowManagementTestCase method getWorkflowDTO.

private WorkflowWizard getWorkflowDTO(String workflowName, String workflowDescription) throws RemoteException, WorkflowAdminServiceWorkflowException {
    WorkflowWizard workflowDTO = new WorkflowWizard();
    workflowDTO.setWorkflowName(workflowName);
    workflowDTO.setWorkflowDescription(workflowDescription);
    workflowDTO.setTemplateId(templateId);
    workflowDTO.setWorkflowImplId(workflowImplId);
    Template template = client.getTemplate(templateId);
    workflowDTO.setTemplate(template);
    WorkflowImpl workflowImpl = client.getWorkflowImpl(templateId, workflowImplId);
    workflowDTO.setWorkflowImpl(workflowImpl);
    Parameter[] parametersImpl = new Parameter[2];
    Parameter parameter = new Parameter();
    parameter.setParamName("BPSProfile");
    parameter.setParamValue("embeded_bps");
    parameter.setHolder("WorkflowImpl");
    parameter.setQName("BPSProfile");
    parametersImpl[0] = parameter;
    parameter = new Parameter();
    parameter.setParamName("HTSubject");
    parameter.setParamValue("sample ht");
    parameter.setHolder("WorkflowImpl");
    parameter.setQName("HTSubject");
    parametersImpl[1] = parameter;
    Parameter[] parametersTmp = new Parameter[1];
    parameter = new Parameter();
    parameter.setParamName("UserAndRole");
    parameter.setParamValue("admin");
    parameter.setHolder("Template");
    parameter.setQName("UserAndRole-step-1-roles");
    parametersTmp[0] = parameter;
    workflowDTO.setTemplateParameters(parametersTmp);
    workflowDTO.setWorkflowImplParameters(parametersImpl);
    return workflowDTO;
}
Also used : WorkflowImpl(org.wso2.carbon.identity.workflow.mgt.stub.metadata.WorkflowImpl) Parameter(org.wso2.carbon.identity.workflow.mgt.stub.bean.Parameter) WorkflowWizard(org.wso2.carbon.identity.workflow.mgt.stub.metadata.WorkflowWizard) Template(org.wso2.carbon.identity.workflow.mgt.stub.metadata.Template)

Aggregations

Parameter (org.wso2.carbon.identity.workflow.mgt.stub.bean.Parameter)2 Template (org.wso2.carbon.identity.workflow.mgt.stub.metadata.Template)2 WorkflowImpl (org.wso2.carbon.identity.workflow.mgt.stub.metadata.WorkflowImpl)2 WorkflowWizard (org.wso2.carbon.identity.workflow.mgt.stub.metadata.WorkflowWizard)2