协作条件
原能力
记录需要谁同意、谁提供资源及谁承担后果,定位尚待协调的责任缺口。(细化版 p.8–9)
首选项目
Flowable(Apache-2.0(开源引擎))。 Flowable
匹配范围
人工任务与关系权限可承载协作及审批。
源码
Flowable · public interface TaskService
modules/flowable-engine/src/main/java/org/flowable/engine/TaskService.java · 46–59 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
public interface TaskService {
/**
* Creates a new task that is not related to any process instance.
*
* The returned task is transient and must be saved with {@link #saveTask(Task)} 'manually'.
*/
Task newTask();
/** create a new task with a user defined task id */
Task newTask(String taskId);
/**
* Create a builder for the task
OpenFGA · func (s *Server) Check(
pkg/server/check.go · 37–50 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
func (s *Server) Check(ctx context.Context, req *openfgav1.CheckRequest) (*openfgav1.CheckResponse, error) {
const methodName = "check"
startTime := time.Now()
tk := req.GetTupleKey()
ctx, span := tracer.Start(ctx, apimethod.Check.String(), trace.WithAttributes(
attribute.KeyValue{Key: "store_id", Value: attribute.StringValue(req.GetStoreId())},
attribute.KeyValue{Key: "object", Value: attribute.StringValue(tk.GetObject())},
attribute.KeyValue{Key: "relation", Value: attribute.StringValue(tk.GetRelation())},
attribute.KeyValue{Key: "user", Value: attribute.StringValue(tk.GetUser())},
attribute.KeyValue{Key: "consistency", Value: attribute.StringValue(req.GetConsistency().String())},
))
defer span.End()
实现与验收要点
谁必须同意、资源提供承诺和后果归属。