Setting Up Mesh Workflows
Manage your Mesh Workflows.
Create
import com.clarifai.grpc.api.*;
import com.clarifai.grpc.api.status.*;
// Insert here the initialization code as outlined on this page:
// https://docs.clarifai.com/api-guide/api-overview/api-clients#client-installation-instructions
MultiWorkflowResponse postWorkflowsResponse = stub.postWorkflows(
PostWorkflowsRequest.newBuilder().addWorkflows(
Workflow.newBuilder()
.setId("my-custom-workflow")
.addNodes(
WorkflowNode.newBuilder()
.setId("food-concepts")
.setModel(
Model.newBuilder()
.setId("bd367be194cf45149e75f01d59f77ba7")
.setModelVersion(ModelVersion.newBuilder().setId("dfebc169854e429086aceb8368662641"))
)
)
.addNodes(
WorkflowNode.newBuilder()
.setId("general-concepts")
.setModel(
Model.newBuilder()
.setId("aaa03c23b3724a16a56b629203edc62c")
.setModelVersion(ModelVersion.newBuilder().setId("aa9ca48295b37401f8af92ad1af0d91d"))
)
)
).build()
);
if (postWorkflowsResponse.getStatus().getCode() != StatusCode.SUCCESS) {
throw new RuntimeException("Post workflows failed, status: " + postWorkflowsResponse.getStatus());
}Workflow Predict
Get
Get all workflows in an app
Get a workflow by a specific ID
Update
Patch workflow
Delete
Delete workflow by ID
Delete all workflows
Last updated
Was this helpful?