Hi Chamila,
Yes. There is an issue in tenant based work flows with BPS 3.2.0 .We have
fixed in the Carbon kernel patch0009. Please  refer [1] for more
information. You can add the patch 9 for BPS 3.2.0 or download BPS 3.5.0 M4
from [2].

[1]https://wso2.org/jira/browse/CARBON-14841
[2]https://svn.wso2.org/repos/wso2/people/warunaj
/releases/bps350/M4/wso2bps-3.5.0-SNAPSHOT.zip

Thanks,
Waruna


On Mon, Sep 8, 2014 at 1:01 PM, Chamila Adhikarinayake <[email protected]>
wrote:

> Hi all,
>
> I'm creating user self signup for tenant stores in API manager. I use BPS
> to manage the workflow and use the instructions in the document[1].
> document has instructions for a different workflow. so I did the following
> changes
>
> 1. copy UserSignupProcess.epr and UserSignupService.epr to
> <bps>/repository/conf/epr folder and rename them
> 2. In UserSignupService.epr, changed <wsa:Address> to
>     <wsa:Address>http://localhost:9765/services/t/
> <tenant_domain>/UserApprovalService</wsa:Address>
>    and username and password to tenant admin username and password
> 3. Modified the deploy.xml in 'UserSignupApprovalProcess_1.0.0.zip' to
> point to that new epr and uploaded it as a bpl to the BPS. (by login in as
> a tenant admin to the BPS)
>
> 4. edit the UserApprovalTask.wsdl in UserApprovalTask-1.0.0.zip in
> Humantask folder. The documentation has some mistake in the instructions.
> so I changed
>     <wsdl:service name="UserApprovalService">
>         <wsdl:port name="UserApprovalPort"
> binding="tns:UserApprovalBinding">
>             <soap:address 
> location="http://localhost:9765/services/t/<tenant_domain>/UserApprovalService"
> />
>         </wsdl:port>
>     </wsdl:service>
>     <wsdl:service name="UserApprovalServiceCB">
>         <wsdl:port name="UserApprovalPortCB"
> binding="tns:UserApprovalBindingCB">
>             <soap:address 
> location="http://localhost:9765/services/t/<tenant_domain>/UserApprovalServiceCB"
> />
>         </wsdl:port>
>     </wsdl:service>
>
>    and uploaded it as human task
>
> 5. modified the workflow-extension.xml in the API manager tenant registry
> to point to the BPS service
> 5. signed up an user to the tenant domain (from my implementation)
> 6. login to workflow-admin and approve the task
>
> But when request comes back to api manager WorkflowCallbackService,
> following error is shown in BPS
>
> [2014-09-08 12:24:30,046] ERROR
> {org.wso2.carbon.bpel.core.ode.integration.PartnerService} -  Error sending
> message to Axis2 for ODE mex {PartnerRoleMex#hqejbhcnphr9l2pvw6bkw4 [PID {
> http://workflow.registeruser.apimgt.carbon.wso2.org}UserSignupProcess-1]
> calling [email protected](...)
> Status REQUEST}
> org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized
>     at
> org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:311)
>
> And in the APIM wirelogs 'Authorization' header is missing in the request
> to the WorkflowCallbackService. This only happens in the tenant mode. for
> superuser signup it works fine (for super user, "Authorization: Basic
> YWRtaW46YWRtaW4=" header and value can be found in logs). Can someone point
> to the mistake I have done in configuring the BPS (any other place to put
> the user credentials) or any suggestion on how this error could happen.
>
> Any comment is highly appreciated
>
> [1] https://docs.wso2.com/display/AM170/Configuring+Workflows+for+Tenants
>
> API manager wirelogs
>
> [2014-09-08 12:24:30,015] DEBUG - wire >> "POST
> /services/WorkflowCallbackService HTTP/1.1[\r][\n]"
> [2014-09-08 12:24:30,015] DEBUG - wire >> "Content-Type: text/xml;
> charset=UTF-8[\r][\n]"
> [2014-09-08 12:24:30,015] DEBUG - wire >> "SOAPAction:
> "urn:resumeEvent"[\r][\n]"
> [2014-09-08 12:24:30,015] DEBUG - wire >> "User-Agent: WSO2 Business
> Process Server-3.2.0[\r][\n]"
> [2014-09-08 12:24:30,015] DEBUG - wire >> "Host: localhost:8243[\r][\n]"
> [2014-09-08 12:24:30,015] DEBUG - wire >> "Transfer-Encoding:
> chunked[\r][\n]"
> [2014-09-08 12:24:30,015] DEBUG - wire >> "[\r][\n]"
> [2014-09-08 12:24:30,015] DEBUG - headers http-incoming-7 >> POST
> /services/WorkflowCallbackService HTTP/1.1
> [2014-09-08 12:24:30,015] DEBUG - headers http-incoming-7 >> Content-Type:
> text/xml; charset=UTF-8
> [2014-09-08 12:24:30,015] DEBUG - headers http-incoming-7 >> SOAPAction:
> "urn:resumeEvent"
> [2014-09-08 12:24:30,015] DEBUG - headers http-incoming-7 >> User-Agent:
> WSO2 Business Process Server-3.2.0
> [2014-09-08 12:24:30,015] DEBUG - headers http-incoming-7 >> Host:
> localhost:8243
> [2014-09-08 12:24:30,015] DEBUG - headers http-incoming-7 >>
> Transfer-Encoding: chunked
> [2014-09-08 12:24:30,017] DEBUG - wire >> "3c4[\r][\n]"
> [2014-09-08 12:24:30,017] DEBUG - wire >> "<?xml version="1.0"
> encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header xmlns:wsa="
> http://www.w3.org/2005/08/addressing";><wsa:To>
> https://localhost:8243/services/WorkflowCallbackService</wsa:To><wsa:MessageID>urn:uuid:747e99b7-0b18-4460-92fc-3895706e359f</wsa:MessageID><wsa:Action>urn:resumeEvent</wsa:Action></soapenv:Header><soapenv:Body><resumeEvent
> xmlns="http://callback.workflow.apimgt.carbon.wso2.org";><ns:workflowReference
> xmlns:ns="http://callback.workflow.apimgt.carbon.wso2.org
> ">aa768206-534b-41d0-8590-518b79dee1aa</ns:workflowReference>[\n]"
> [2014-09-08 12:24:30,017] DEBUG - wire >> "  <ns:status xmlns:ns="
> http://callback.workflow.apimgt.carbon.wso2.org";>APPROVED</ns:status>[\n]"
> [2014-09-08 12:24:30,017] DEBUG - wire >> "  <ns:description xmlns:ns="
> http://callback.workflow.apimgt.carbon.wso2.org";>Approve APIStore signup
> request done by PRIMARY/testuser from the tenant domain wso2.com
> </ns:description>[\n]"
> [2014-09-08 12:24:30,017] DEBUG - wire >> "[\n]"
> [2014-09-08 12:24:30,017] DEBUG - wire >> "
> </resumeEvent></soapenv:Body></soapenv:Envelope>[\r][\n]"
> [2014-09-08 12:24:30,017] DEBUG - wire >> "0[\r][\n]"
> [2014-09-08 12:24:30,017] DEBUG - wire >> "[\r][\n]"
> [2014-09-08 12:24:30,023] DEBUG - headers http-outgoing-7 >> POST
> /store/site/blocks/workflow/workflow-listener/ajax/workflow-listener.jag
> HTTP/1.1
> [2014-09-08 12:24:30,024] DEBUG - headers http-outgoing-7 >> Content-Type:
> application/x-www-form-urlencoded
> [2014-09-08 12:24:30,024] DEBUG - headers http-outgoing-7 >> SOAPAction:
> urn:resumeEvent
> [2014-09-08 12:24:30,024] DEBUG - headers http-outgoing-7 >>
> Transfer-Encoding: chunked
> [2014-09-08 12:24:30,024] DEBUG - headers http-outgoing-7 >> Host:
> localhost:9443
> [2014-09-08 12:24:30,024] DEBUG - headers http-outgoing-7 >> Connection:
> Keep-Alive
> [2014-09-08 12:24:30,024] DEBUG - headers http-outgoing-7 >> User-Agent:
> Synapse-PT-HttpComponents-NIO
> [2014-09-08 12:24:30,024] DEBUG - wire << "POST
> /store/site/blocks/workflow/workflow-listener/ajax/workflow-listener.jag
> HTTP/1.1[\r][\n]"
> [2014-09-08 12:24:30,024] DEBUG - wire << "Content-Type:
> application/x-www-form-urlencoded[\r][\n]"
> [2014-09-08 12:24:30,024] DEBUG - wire << "SOAPAction:
> urn:resumeEvent[\r][\n]"
> [2014-09-08 12:24:30,024] DEBUG - wire << "Transfer-Encoding:
> chunked[\r][\n]"
> [2014-09-08 12:24:30,024] DEBUG - wire << "Host: localhost:9443[\r][\n]"
> [2014-09-08 12:24:30,024] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"
> [2014-09-08 12:24:30,024] DEBUG - wire << "User-Agent:
> Synapse-PT-HttpComponents-NIO[\r][\n]"
> [2014-09-08 12:24:30,024] DEBUG - wire << "[\r][\n]"
> [2014-09-08 12:24:30,025] DEBUG - wire << "ca[\r][\n]"
> [2014-09-08 12:24:30,025] DEBUG - wire <<
> "workflowReference=aa768206-534b-41d0-8590-518b79dee1aa&status=APPROVED&description=Approve%20APIStore%20signup%20request%20done%20by%20PRIMARY%2Ftestuser%20from%20the%20tenant%20domain%
> 20wso2.com[\r][\n]"
> [2014-09-08 12:24:30,025] DEBUG - wire << "0[\r][\n]"
> [2014-09-08 12:24:30,025] DEBUG - wire << "[\r][\n]"
> [2014-09-08 12:24:30,027] DEBUG - wire >> "HTTP/1.1 401
> Unauthorized[\r][\n]"
> [2014-09-08 12:24:30,027] DEBUG - wire >> "Set-Cookie:
> JSESSIONID=E87487F7917E7E0B6F82202C3067E25B; Path=/store/; Secure;
> HttpOnly[\r][\n]"
> [2014-09-08 12:24:30,027] DEBUG - wire >> "Content-Type:
> application/json;charset=UTF-8[\r][\n]"
> [2014-09-08 12:24:30,027] DEBUG - wire >> "Content-Length: 98[\r][\n]"
> [2014-09-08 12:24:30,027] DEBUG - wire >> "Date: Mon, 08 Sep 2014 06:54:29
> GMT[\r][\n]"
> [2014-09-08 12:24:30,027] DEBUG - wire >> "Server: WSO2 Carbon
> Server[\r][\n]"
> [2014-09-08 12:24:30,027] DEBUG - wire >> "[\r][\n]"
> [2014-09-08 12:24:30,027] DEBUG - wire >> "{"workflowCallbackResponse" :
> {"error" : "true", "message" : "Required Credentials Not Provided"}}"
> [2014-09-08 12:24:30,027] DEBUG - headers http-outgoing-7 << HTTP/1.1 401
> Unauthorized
> [2014-09-08 12:24:30,027] DEBUG - headers http-outgoing-7 << Set-Cookie:
> JSESSIONID=E87487F7917E7E0B6F82202C3067E25B; Path=/store/; Secure; HttpOnly
> [2014-09-08 12:24:30,027] DEBUG - headers http-outgoing-7 << Content-Type:
> application/json;charset=UTF-8
> [2014-09-08 12:24:30,027] DEBUG - headers http-outgoing-7 <<
> Content-Length: 98
> [2014-09-08 12:24:30,028] DEBUG - headers http-outgoing-7 << Date: Mon, 08
> Sep 2014 06:54:29 GMT
> [2014-09-08 12:24:30,028] DEBUG - headers http-outgoing-7 << Server: WSO2
> Carbon Server
> [2014-09-08 12:24:30,037] DEBUG - headers http-incoming-7 << HTTP/1.1 401
> Unauthorized
> [2014-09-08 12:24:30,037] DEBUG - headers http-incoming-7 << Set-Cookie:
> JSESSIONID=E87487F7917E7E0B6F82202C3067E25B; Path=/store/; Secure; HttpOnly
> [2014-09-08 12:24:30,038] DEBUG - headers http-incoming-7 << Content-Type:
> text/xml
> [2014-09-08 12:24:30,038] DEBUG - headers http-incoming-7 << Date: Mon, 08
> Sep 2014 06:54:30 GMT
> [2014-09-08 12:24:30,038] DEBUG - headers http-incoming-7 << Server:
> WSO2-PassThrough-HTTP
> [2014-09-08 12:24:30,038] DEBUG - headers http-incoming-7 <<
> Transfer-Encoding: chunked
> [2014-09-08 12:24:30,038] DEBUG - wire << "HTTP/1.1 401
> Unauthorized[\r][\n]"
> [2014-09-08 12:24:30,038] DEBUG - wire << "Set-Cookie:
> JSESSIONID=E87487F7917E7E0B6F82202C3067E25B; Path=/store/; Secure;
> HttpOnly[\r][\n]"
> [2014-09-08 12:24:30,038] DEBUG - wire << "Content-Type: text/xml[\r][\n]"
> [2014-09-08 12:24:30,038] DEBUG - wire << "Date: Mon, 08 Sep 2014 06:54:30
> GMT[\r][\n]"
> [2014-09-08 12:24:30,038] DEBUG - wire << "Server:
> WSO2-PassThrough-HTTP[\r][\n]"
> [2014-09-08 12:24:30,038] DEBUG - wire << "Transfer-Encoding:
> chunked[\r][\n]"
> [2014-09-08 12:24:30,038] DEBUG - wire << "[\r][\n]"
> [2014-09-08 12:24:30,039] DEBUG - wire << "11c[\r][\n]"
> [2014-09-08 12:24:30,039] DEBUG - wire << "<?xml version='1.0'
> encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="
> http://www.w3.org/2003/05/soap-envelope";><soapenv:Body><workflowCallbackResponse><error>true</error><message>Required
> Credentials Not
> Provided</message></workflowCallbackResponse></soapenv:Body></soapenv:Envelope>[\r][\n]"
> [2014-09-08 12:24:30,039] DEBUG - wire << "0[\r][\n]"
> [2014-09-08 12:24:30,039] DEBUG - wire << "[\r][\n]"
>
> Thanks,
> Chamila.
>
>
>
>
> --
> Regards,
> Chamila Adhikarinayake
> Software Engineer
> WSO2, Inc.
> Mobile - +94712346437
> Email  - [email protected]
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Regards,

Waruna Lakshitha Jayaweera
Software Engineer
WSO2 Inc; http://wso2.com
phone: +94713255198
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to