根据官网报错:
org.flowable.common.engine.api.FlowableException: Could not find org.flowable.http.HttpActivityBehavior:
at org.flowable.engine.impl.bpmn.parser.factory.DefaultActivityBehaviorFactory.createHttpActivityBehavior
Caused by: java.lang.ClassNotFoundException: org.flowable.http.bpmn.impl.HttpActivityBehaviorImpl
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
解决:
- 该类在flowable-http里!
- https://github.com/flowable/flowable-engine/tree/master/modules/flowable-http/src/main/java/org/flowable/http/bpmn/impl
- flowable-spring-boot-starter中不包含该jar
- 查看flowable所有的starter
- https://www.flowable.org/docs/userguide/index.html#springBootFlowableStarter
- 找不到像的
- 使用:
-
<!-- https://mvnrepository.com/artifact/org.flowable/flowable-http -->
调用REST报错:
org.flowable.common.engine.api.FlowableException: Unknown property used in expression: ${requestTimeout}
at org.flowable.common.engine.impl.el.JuelExpression.getValue(JuelExpression.java:50)
Caused by: org.flowable.common.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'requestTimeout'
at org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstIdentifier.eval(AstIdentifier.java:97)
解决:
- requestTimeout需作为入参传入。
Caused by: org.apache.http.impl.execchain.RequestAbortedException: Request aborted
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:180)
解决:
- requestTimeout设置了1,1毫秒太短,requestTimeout改为1000.
http://flowable.org改为http://localhost:8830/cbss报错:
org.springframework.web.HttpMediaTypeNotAcceptableException: Could not parse 'Accept' header [text/html Cache-Control: no-cache]: Invalid mime type "text/html Cache-Control: no-cache": Invalid token character ' ' in token "html Cache-Control: no-cache"
at org.springframework.web.accept.HeaderContentNegotiationStrategy.resolveMediaTypes(HeaderContentNegotiationStrategy.java:59)
- Accept: text/html Cache-Control: no-cache
- Accept: application/json Cache-Control: no-cache text/html改application/json还是错
org.springframework.web.HttpMediaTypeNotAcceptableException: Could not parse 'Accept' header [application/json Cache-Control: no-cache]:
Invalid mime type "application/json Cache-Control: no-cache": Invalid token character ' ' in token "json Cache-Control: no-cache"
解决:
- Cache-Control: no-cache删掉。