对于我的论文,我将 Bonita BPM 集成到 Mule SOA 中。
要在 Bonita 中启动新案例或流程实例,我必须调用 Bonita REST。首先,我必须使用 Bonita REST 进行身份验证。这里开始我的问题。
身份验证的工作方式类似于“您必须调用登录服务并将响应的 cookie 放入所有未来的请求中”。
这怎么可能在骡子流中完成?有些文章告诉我 copy-properties propertyName="JSESSIONID" 应该这样做。但这不起作用。
有人有想法吗?
进一步继承我的流程和相关的打印消息:
PRINT1:CopyPropertiesTransformer:属性值为空,不会复制任何属性
打印 2:LoggerMessageProcessor:{Set-Cookie=JSESSIONID=F60114E3ECB450A62171E3D63EAC3E4D;路径=/bonita/; HttpOnly}
PRINT 3:响应代码 401 映射为失败。消息有效负载的类型:BufferInputStream
<http:request-config name="bos" host="localhost"
port="8080" basePath="/bonita" doc:name="bos-connection" />
<flow name="sendOrderFlow">
<http:listener config-ref="HTTP_Listener_Configuration"
path="/" doc:name="HTTP" />
<http:request config-ref="bos" path="loginservice"
method="GET" followRedirects="false" doc:name="bos-login">
<http:request-builder>
<http:query-param paramName="username" value="walter.bates" />
<http:query-param paramName="password" value="bpm" />
</http:request-builder>
</http:request>
<copy-properties propertyName="JSESSIONID" /> <!-- PRINT 1 HERE -->
<logger message="#[headers:INBOUND:Set-Cookie]" level="INFO" /> <!-- PRINT 2 HERE -->
<http:request config-ref="bos"
path="API/bpm/process" method="GET" followRedirects="false" doc:name="bos-listAvailableProcesses">
<http:request-builder>
<http:query-param paramName="p" value="0" />
</http:request-builder>
</http:request>