(orchestration().v1() )
Cancel a running workflow
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .CancelEventRequest ;
import com .formance .formance_sdk .models .operations .CancelEventResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
CancelEventRequest req = CancelEventRequest .builder ()
.instanceID ("xxx" )
.build ();
CancelEventResponse res = sdk .orchestration ().v1 ().cancelEvent ()
.request (req )
.call ();
// handle response
}
}
Parameter
Type
Required
Description
request
CancelEventRequest
✔️
The request object to use for the request.
CancelEventResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
Create trigger
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .CreateTriggerResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import com .formance .formance_sdk .models .shared .TriggerData ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
TriggerData req = TriggerData .builder ()
.event ("<value>" )
.workflowID ("<id>" )
.build ();
CreateTriggerResponse res = sdk .orchestration ().v1 ().createTrigger ()
.request (req )
.call ();
if (res .createTriggerResponse ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
request
TriggerData
✔️
The request object to use for the request.
CreateTriggerResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
Create a workflow
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .CreateWorkflowResponse ;
import com .formance .formance_sdk .models .shared .CreateWorkflowRequest ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
import java .util .List ;
import java .util .Map ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
CreateWorkflowRequest req = CreateWorkflowRequest .builder ()
.stages (List .of (
Map .ofEntries (
Map .entry ("key" , "<value>" ))))
.build ();
CreateWorkflowResponse res = sdk .orchestration ().v1 ().createWorkflow ()
.request (req )
.call ();
if (res .createWorkflowResponse ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
request
CreateWorkflowRequest
✔️
The request object to use for the request.
CreateWorkflowResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
Read trigger
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .DeleteTriggerRequest ;
import com .formance .formance_sdk .models .operations .DeleteTriggerResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
DeleteTriggerRequest req = DeleteTriggerRequest .builder ()
.triggerID ("<id>" )
.build ();
DeleteTriggerResponse res = sdk .orchestration ().v1 ().deleteTrigger ()
.request (req )
.call ();
// handle response
}
}
Parameter
Type
Required
Description
request
DeleteTriggerRequest
✔️
The request object to use for the request.
DeleteTriggerResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
Delete a flow by id
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .DeleteWorkflowRequest ;
import com .formance .formance_sdk .models .operations .DeleteWorkflowResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
DeleteWorkflowRequest req = DeleteWorkflowRequest .builder ()
.flowId ("xxx" )
.build ();
DeleteWorkflowResponse res = sdk .orchestration ().v1 ().deleteWorkflow ()
.request (req )
.call ();
// handle response
}
}
Parameter
Type
Required
Description
request
DeleteWorkflowRequest
✔️
The request object to use for the request.
DeleteWorkflowResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
Get a workflow instance by id
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .GetInstanceRequest ;
import com .formance .formance_sdk .models .operations .GetInstanceResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
GetInstanceRequest req = GetInstanceRequest .builder ()
.instanceID ("xxx" )
.build ();
GetInstanceResponse res = sdk .orchestration ().v1 ().getInstance ()
.request (req )
.call ();
if (res .getWorkflowInstanceResponse ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
request
GetInstanceRequest
✔️
The request object to use for the request.
GetInstanceResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
Get a workflow instance history by id
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .GetInstanceHistoryRequest ;
import com .formance .formance_sdk .models .operations .GetInstanceHistoryResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
GetInstanceHistoryRequest req = GetInstanceHistoryRequest .builder ()
.instanceID ("xxx" )
.build ();
GetInstanceHistoryResponse res = sdk .orchestration ().v1 ().getInstanceHistory ()
.request (req )
.call ();
if (res .getWorkflowInstanceHistoryResponse ().isPresent ()) {
// handle response
}
}
}
GetInstanceHistoryResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
Get a workflow instance stage history
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .GetInstanceStageHistoryRequest ;
import com .formance .formance_sdk .models .operations .GetInstanceStageHistoryResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
GetInstanceStageHistoryRequest req = GetInstanceStageHistoryRequest .builder ()
.instanceID ("xxx" )
.number (0L )
.build ();
GetInstanceStageHistoryResponse res = sdk .orchestration ().v1 ().getInstanceStageHistory ()
.request (req )
.call ();
if (res .getWorkflowInstanceHistoryStageResponse ().isPresent ()) {
// handle response
}
}
}
GetInstanceStageHistoryResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
Get a flow by id
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .GetWorkflowRequest ;
import com .formance .formance_sdk .models .operations .GetWorkflowResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
GetWorkflowRequest req = GetWorkflowRequest .builder ()
.flowId ("xxx" )
.build ();
GetWorkflowResponse res = sdk .orchestration ().v1 ().getWorkflow ()
.request (req )
.call ();
if (res .getWorkflowResponse ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
request
GetWorkflowRequest
✔️
The request object to use for the request.
GetWorkflowResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
List instances of a workflow
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .ListInstancesRequest ;
import com .formance .formance_sdk .models .operations .ListInstancesResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
ListInstancesRequest req = ListInstancesRequest .builder ()
.running (true )
.workflowID ("xxx" )
.build ();
ListInstancesResponse res = sdk .orchestration ().v1 ().listInstances ()
.request (req )
.call ();
if (res .listRunsResponse ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
request
ListInstancesRequest
✔️
The request object to use for the request.
ListInstancesResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
List triggers
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .ListTriggersRequest ;
import com .formance .formance_sdk .models .operations .ListTriggersResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
ListTriggersRequest req = ListTriggersRequest .builder ()
.build ();
ListTriggersResponse res = sdk .orchestration ().v1 ().listTriggers ()
.request (req )
.call ();
if (res .listTriggersResponse ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
request
ListTriggersRequest
✔️
The request object to use for the request.
ListTriggersResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
List triggers occurrences
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .ListTriggersOccurrencesRequest ;
import com .formance .formance_sdk .models .operations .ListTriggersOccurrencesResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
ListTriggersOccurrencesRequest req = ListTriggersOccurrencesRequest .builder ()
.triggerID ("<id>" )
.build ();
ListTriggersOccurrencesResponse res = sdk .orchestration ().v1 ().listTriggersOccurrences ()
.request (req )
.call ();
if (res .listTriggersOccurrencesResponse ().isPresent ()) {
// handle response
}
}
}
ListTriggersOccurrencesResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
List registered workflows
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .ListWorkflowsResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
ListWorkflowsResponse res = sdk .orchestration ().v1 ().listWorkflows ()
.call ();
if (res .listWorkflowsResponse ().isPresent ()) {
// handle response
}
}
}
ListWorkflowsResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
orchestrationgetServerInfo
Get server info
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .OrchestrationgetServerInfoResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
OrchestrationgetServerInfoResponse res = sdk .orchestration ().v1 ().orchestrationgetServerInfo ()
.call ();
if (res .serverInfo ().isPresent ()) {
// handle response
}
}
}
OrchestrationgetServerInfoResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
Read trigger
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .ReadTriggerRequest ;
import com .formance .formance_sdk .models .operations .ReadTriggerResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
ReadTriggerRequest req = ReadTriggerRequest .builder ()
.triggerID ("<id>" )
.build ();
ReadTriggerResponse res = sdk .orchestration ().v1 ().readTrigger ()
.request (req )
.call ();
if (res .readTriggerResponse ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
request
ReadTriggerRequest
✔️
The request object to use for the request.
ReadTriggerResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
Run workflow
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .RunWorkflowRequest ;
import com .formance .formance_sdk .models .operations .RunWorkflowResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
RunWorkflowRequest req = RunWorkflowRequest .builder ()
.workflowID ("xxx" )
.build ();
RunWorkflowResponse res = sdk .orchestration ().v1 ().runWorkflow ()
.request (req )
.call ();
if (res .runWorkflowResponse ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
request
RunWorkflowRequest
✔️
The request object to use for the request.
RunWorkflowResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*
Send an event to a running workflow
package hello .world ;
import com .formance .formance_sdk .SDK ;
import com .formance .formance_sdk .models .errors .Error ;
import com .formance .formance_sdk .models .operations .SendEventRequest ;
import com .formance .formance_sdk .models .operations .SendEventResponse ;
import com .formance .formance_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws Error , Exception {
SDK sdk = SDK .builder ()
.security (Security .builder ()
.clientID ("<YOUR_CLIENT_ID_HERE>" )
.clientSecret ("<YOUR_CLIENT_SECRET_HERE>" )
.build ())
.build ();
SendEventRequest req = SendEventRequest .builder ()
.instanceID ("xxx" )
.build ();
SendEventResponse res = sdk .orchestration ().v1 ().sendEvent ()
.request (req )
.call ();
// handle response
}
}
Parameter
Type
Required
Description
request
SendEventRequest
✔️
The request object to use for the request.
SendEventResponse
Error Type
Status Code
Content Type
models/errors/Error
default
application/json
models/errors/SDKError
4XX, 5XX
*/*