カスタム・アクションの作成
テナントのカスタム・アクションを作成し、それを 1 つ以上の作業キューで使用できます。
actionDefinitionを作成するには、以下の cURL コマンドを実行します。
curl -k -L -X POST 'https://metadata.infohub.shared-services-wdc.pr.wce.ibm.com/api/v1/actions' \
-H 'tenantId: $tenantId' \
-H 'Authorization: bearer $JWT' \
-H 'Content-Type: application/json' \
--data-raw '{
"tenantId": $tenantId,
"name": "My Custom Action",
"logicalName": "myCustomAction"
"shortDescription": "Time to Resolution: Approx. 3 days",
"isGloballyVisible": false,
"shortDescriptionInfo": "This resolution uses my custom BAW Workflow process.",
"descriptionContentType": "HTML",
"subType": "Resolution",
"externalWorkflowDefinition": {
"id": $externalWorkflowDefinitionId,
},
"externalWorkflowDefinitionParams": [
{
"name": "container",
"value": "MCW2"
},
{
"name": "model",
"value": "My Custom Workflow"
}
]
}'
アクションを作成した後、そのアクションをワーク・キューに関連付けて、そのワーク・キューのワーク・アイテムの解決に使用できるようにする必要があります。
カスタム作業キューへのカスタム・アクションの追加
テナント用のカスタム作業キューを作成した場合は、 /api/v1/workqueues API を使用して、その WorkQueueDefinition を更新し、このカスタム・アクションを applicableActionDefinitions リストに組み込むことができます。
事前構成された作業キューへのカスタム・アクションの追加
事前構成された作業キューに関連付けるには、作業キュー・オーバーライドを作成する必要があります。 これはアクション・オーバーライドと似ています。事前構成された作業キューはすべてのテナントに表示され、カスタム・アクションはテナントにのみ表示されるためです。
事前構成された作業キューにカスタム・アクションを追加するには、以下の cURL コマンドを実行します。
curl -k -L -X POST 'https://metadata.infohub.shared-services-wdc.pr.wce.ibm.com/api/v1/ruleoverrides' \
-H 'tenantId: $tenantId' \
-H 'Authorization: bearer $JWT' \
-H 'Content-Type: application/json' \
--data-raw '{
"tenantId": "$tenantId",
"type": "WorkQueue",
"enabled": true,
"workQueueId": "$workQueueId",
"applicableActionDefinitions": [
{
"id": "$defaultAction1Id",
"type": "ActionDefinition"
},
{
"id": "$defaultAction2Id",
"type": "ActionDefinition"
},
...
{
"id": "$myCustomActionId",
"type": "ActionDefinition"
}
]
}
この ruleOverride を使用して、事前構成された作業キューのアクション・セットをカスタマイズできます。 この変更はテナントにのみ適用され、他のテナントの事前構成済み作業キューには影響しません。