目录
- 定义
- 图形标记
- XML内容
- 界面操作
定义
Sc 任务不是 BPMN 2.0 规范定义的官方任务,在 Flowable 中,Sc 任务是作为一种特殊的服务
任务来实现的,主要调用springcloud的微服务使用。
图形标记
由于 Sc 任务不是 BPMN 2.0 规范的“官方”任务,因此没有提供其专用图标,
而是复用了服务任务的图标:

XML内容
Sc 任务在 Flowable 中定义为一个专用的服务任务,这个服务任务的 type 属性设置为 sc。
Sc 任务的 XML 表示格式如下:
<serviceTask id="Activity_1ip6ske" name="微服务回调" flowable:type="sc">
<extensionElements>
<flowable:field name="serviceId">
<flowable:string>flow-center</flowable:string>
</flowable:field>
<flowable:field name="url">
<flowable:string>/api/order/getOrderInfo</flowable:string>
</flowable:field>
<flowable:field name="method">
<flowable:string>POST</flowable:string>
</flowable:field>
<flowable:field name="params">
<flowable:expression>{"id":"liuwenjun","name":"${name}"}</flowable:expression>
</flowable:field>
<flowable:field name="ignoreException">
<flowable:string>false</flowable:string>
</flowable:field>
<flowable:field name="saveResponseParameters">
<flowable:string>false</flowable:string>
</flowable:field>
</extensionElements>
</serviceTask>
以上在流程定义的服务任务上定义 sc 类型即可。
参数说明:
| 属性名称 | 属性说明 |
|---|---|
| serviceId | 微服务的serviceId |
| url | 请求的url |
| method | 请求方式 |
| params | 请求参数 |
| ignoreException | 是否忽略异常 |
| saveResponseParameters | 是否返回结果保持到流程实例变量中 |
| responseVariableName | 返回结果保持到流程变量的名称 |
注意:
1、忽略异常设置成是,组件会停留在这里
2、保留结果:汇报请求的结果保持到流程变量中去
界面操作

视频地址:
FlowableBpmn2.0组件讲解


![[JavaWeb]SQL介绍-DDL-DML](https://img-blog.csdnimg.cn/05033827a41648daa359f62a65d01cfc.png#pic_center)

![[nlp] TF-IDF算法介绍](https://img-blog.csdnimg.cn/4e186ba8072d46ecac7be6eda9f882ba.png)













](https://img-blog.csdnimg.cn/e14d2e94bdbf4819bf683585d19efc1f.png)
