Actions
The ballerinax/sap.successfactors.ecworkflow package exposes the following clients:
Available clients:
| Client | Purpose |
|---|---|
Client | Manages ecworkflow objects: MyPendingWorkflow, WfRequestParticipator, WorkflowAllowedActionList, AlertMessage, WfRequestComments, WfRequestStep, AutoDelegateDetail, AutoDelegateConfig…, over the SAP SuccessFactors OData v2 API. |
Client
You can use these APIs to access data of employees workflow requests and and other workflow data such as current status.
Configuration
ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with the SAP SuccessFactors OData endpoint. Passed as the argument to the client initializer.
| Field | Type | Default | Description |
|---|---|---|---|
auth | http:CredentialsConfig | Required | Configurations related to client authentication |
httpVersion | http:HttpVersion | See default | The HTTP version understood by the client |
http1Settings | http:ClientHttp1Settings | See default | Configurations related to HTTP/1.x protocol |
http2Settings | http:ClientHttp2Settings | See default | Configurations related to HTTP/2 protocol |
timeout | decimal | See default | The maximum time to wait (in seconds) for a response before closing the connection |
forwarded | string | See default | The choice of setting forwarded/x-forwarded header |
followRedirects | http:FollowRedirects | Optional | Configurations associated with Redirection |
poolConfig | http:PoolConfiguration | Optional | Configurations associated with request pooling |
cache | http:CacheConfig | See default | HTTP caching related configurations |
compression | http:Compression | See default | Specifies the way of handling compression (accept-encoding) header |
circuitBreaker | http:CircuitBreakerConfig | Optional | Configurations associated with the behaviour of the Circuit Breaker |
retryConfig | http:RetryConfig | Optional | Configurations associated with retrying |
cookieConfig | http:CookieConfig | Optional | Configurations associated with cookies |
responseLimits | http:ResponseLimitConfigs | See default | Configurations associated with inbound response size limits |
secureSocket | http:ClientSecureSocket | Optional | SSL/TLS-related options |
proxy | http:ProxyConfig | Optional | Proxy server related options |
socketConfig | http:ClientSocketConfig | See default | Provides settings related to client socket configuration |
validation | boolean | See default | Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default |
laxDataBinding | boolean | See default | Enables relaxed data binding on the client side. When enabled, nil values are treated as optional, and absent fields are handled as nilable types. Enabled by default. |
The client also accepts a hostname string parameter (the SAP SuccessFactors API server host) and an optional port (defaults to 443).
Initializing the client
import ballerinax/sap.successfactors.ecworkflow;
configurable string hostname = ?;
configurable string username = ?;
configurable string password = ?;
ecworkflow:Client client = check new (
{
auth: { username, password }
},
hostname
);
Operations
MyPendingWorkflow
listMyPendingWorkflows
Queries the MyPendingWorkflow collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListMyPendingWorkflowsQueries | No | Queries to be sent with the request |
Returns: ListMyPendingWorkflowsResponse|error
Sample code:
ListMyPendingWorkflowsResponse result = check client->listMyPendingWorkflows();
Sample response:
{
"d": {
"results": [
{
"wfRequestId": "1000"
}
]
}
}
getMyPendingWorkflow
Retrieves a single MyPendingWorkflow entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
wfRequestId | string | Yes | key: wfRequestId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetMyPendingWorkflowQueries | No | Queries to be sent with the request |
Returns: MyPendingWorkflow_1|error
Sample code:
MyPendingWorkflow_1 result = check client->getMyPendingWorkflow(wfRequestId);
Sample response:
{
"d": {
"wfRequestId": "1000"
}
}
WfRequestParticipator
listWfRequestParticipators
Queries the WfRequestParticipator collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListWfRequestParticipatorsQueries | No | Queries to be sent with the request |
Returns: ListWfRequestParticipatorsResponse|error
Sample code:
ListWfRequestParticipatorsResponse result = check client->listWfRequestParticipators();
Sample response:
{
"d": {
"results": [
{
"wfRequestParticipatorId": "1000"
}
]
}
}
getWfRequestParticipator
Retrieves a single WfRequestParticipator entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
wfRequestParticipatorId | int | Yes | key: wfRequestParticipatorId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetWfRequestParticipatorQueries | No | Queries to be sent with the request |
Returns: WfRequestParticipator_1|error
Sample code:
WfRequestParticipator_1 result = check client->getWfRequestParticipator(wfRequestParticipatorId);
Sample response:
{
"d": {
"wfRequestParticipatorId": "1000"
}
}
WorkflowAllowedActionList
listWorkflowAllowedActionLists
Queries the WorkflowAllowedActionList collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListWorkflowAllowedActionListsQueries | No | Queries to be sent with the request |
Returns: ListWorkflowAllowedActionListsResponse|error
Sample code:
ListWorkflowAllowedActionListsResponse result = check client->listWorkflowAllowedActionLists();
Sample response:
{
"d": {
"results": [
{
"wfRequestId": "1000"
}
]
}
}
getWorkflowAllowedActionList
Retrieves a single WorkflowAllowedActionList entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
wfRequestId | int | Yes | key: wfRequestId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetWorkflowAllowedActionListQueries | No | Queries to be sent with the request |
Returns: WorkflowAllowedActionList_1|error
Sample code:
WorkflowAllowedActionList_1 result = check client->getWorkflowAllowedActionList(wfRequestId);
Sample response:
{
"d": {
"wfRequestId": "1000"
}
}
AlertMessage
listAlertMessages
Queries the AlertMessage collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListAlertMessagesQueries | No | Queries to be sent with the request |
Returns: ListAlertMessagesResponse|error
Sample code:
ListAlertMessagesResponse result = check client->listAlertMessages();
Sample response:
{
"d": {
"results": [
{
"externalCode": "1000",
"wfRequestNav": {}
}
]
}
}
createAlertMessage
Creates a new AlertMessage entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AlertMessage | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedAlertMessage|error
Sample code:
CreatedAlertMessage result = check client->createAlertMessage(payload);
Sample response:
{
"d": {
"externalCode": "1000",
"wfRequestNav": {
"results": []
}
}
}
getAlertMessage
Retrieves a single AlertMessage entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | string | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetAlertMessageQueries | No | Queries to be sent with the request |
Returns: AlertMessage_1|error
Sample code:
AlertMessage_1 result = check client->getAlertMessage(externalCode);
Sample response:
{
"d": {
"externalCode": "1000",
"wfRequestNav": {
"results": []
}
}
}
updateAlertMessage
Updates the AlertMessage identified by its key property with the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | string | Yes | key: externalCode |
payload | ModifiedAlertMessage | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateAlertMessage(externalCode, payload);
deleteAlertMessage
Deletes the AlertMessage identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | string | Yes | key: externalCode |
headers | DeleteAlertMessageHeaders | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteAlertMessage(externalCode);
WfRequestComments
listWfRequestCommentss
Queries the WfRequestComments collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListWfRequestCommentssQueries | No | Queries to be sent with the request |
Returns: ListWfRequestCommentssResponse|error
Sample code:
ListWfRequestCommentssResponse result = check client->listWfRequestCommentss();
Sample response:
{
"d": {
"results": [
{
"wfRequestCommentId": "1000"
}
]
}
}
getWfRequestComments
Retrieves a single WfRequestComments entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
wfRequestCommentId | int | Yes | key: wfRequestCommentId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetWfRequestCommentsQueries | No | Queries to be sent with the request |
Returns: WfRequestComments_1|error
Sample code:
WfRequestComments_1 result = check client->getWfRequestComments(wfRequestCommentId);
Sample response:
{
"d": {
"wfRequestCommentId": "1000"
}
}
WfRequestStep
listWfRequestSteps
Queries the WfRequestStep collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListWfRequestStepsQueries | No | Queries to be sent with the request |
Returns: ListWfRequestStepsResponse|error
Sample code:
ListWfRequestStepsResponse result = check client->listWfRequestSteps();
Sample response:
{
"d": {
"results": [
{
"wfRequestStepId": "1000",
"wfRequestNav": {}
}
]
}
}
getWfRequestStep
Retrieves a single WfRequestStep entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
wfRequestStepId | int | Yes | key: wfRequestStepId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetWfRequestStepQueries | No | Queries to be sent with the request |
Returns: WfRequestStep_1|error
Sample code:
WfRequestStep_1 result = check client->getWfRequestStep(wfRequestStepId);
Sample response:
{
"d": {
"wfRequestStepId": "1000",
"wfRequestNav": {
"wfRequestId": "1000",
"empWfRequestNav": {},
"parentWfRequestNav": {},
"wfRequestCommentsNav": {},
"wfRequestParticipatorNav": {},
"wfRequestStepNav": {},
"workflowAllowedActionListNav": {}
}
}
}
AutoDelegateDetail
listAutoDelegateDetails
Queries the AutoDelegateDetail collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListAutoDelegateDetailsQueries | No | Queries to be sent with the request |
Returns: ListAutoDelegateDetailsResponse|error
Sample code:
ListAutoDelegateDetailsResponse result = check client->listAutoDelegateDetails();
Sample response:
{
"d": {
"results": [
{
"AutoDelegateConfig_delegator": "string",
"externalCode": "1000"
}
]
}
}
createAutoDelegateDetail
Creates a new AutoDelegateDetail entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AutoDelegateDetail | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedAutoDelegateDetail|error
Sample code:
CreatedAutoDelegateDetail result = check client->createAutoDelegateDetail(payload);
Sample response:
{
"d": {
"AutoDelegateConfig_delegator": "string",
"externalCode": "1000"
}
}
getAutoDelegateDetail
Retrieves a single AutoDelegateDetail entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
AutoDelegateConfig_delegator | string | Yes | key: AutoDelegateConfig_delegator |
externalCode | string | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetAutoDelegateDetailQueries | No | Queries to be sent with the request |
Returns: AutoDelegateDetail_1|error
Sample code:
AutoDelegateDetail_1 result = check client->getAutoDelegateDetail(AutoDelegateConfig_delegator, externalCode);
Sample response:
{
"d": {
"AutoDelegateConfig_delegator": "string",
"externalCode": "1000"
}
}
updateAutoDelegateDetail
Updates the AutoDelegateDetail identified by its key properties with the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
AutoDelegateConfig_delegator | string | Yes | key: AutoDelegateConfig_delegator |
externalCode | string | Yes | key: externalCode |
payload | ModifiedAutoDelegateDetail | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateAutoDelegateDetail(AutoDelegateConfig_delegator, externalCode, payload);
deleteAutoDelegateDetail
Deletes the AutoDelegateDetail identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
AutoDelegateConfig_delegator | string | Yes | key: AutoDelegateConfig_delegator |
externalCode | string | Yes | key: externalCode |
headers | DeleteAutoDelegateDetailHeaders | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteAutoDelegateDetail(AutoDelegateConfig_delegator, externalCode);
AutoDelegateConfig
listAutoDelegateConfigs
Queries the AutoDelegateConfig collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListAutoDelegateConfigsQueries | No | Queries to be sent with the request |
Returns: json|error
Sample code:
json result = check client->listAutoDelegateConfigs();
getAutoDelegateConfig
Retrieves a single AutoDelegateConfig entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
delegator | string | Yes | key: delegator |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetAutoDelegateConfigQueries | No | Queries to be sent with the request |
Returns: json|error
Sample code:
json result = check client->getAutoDelegateConfig(delegator);
deleteAutoDelegateConfig
Deletes the AutoDelegateConfig identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
delegator | string | Yes | key: delegator |
headers | DeleteAutoDelegateConfigHeaders | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteAutoDelegateConfig(delegator);
EmpWfRequest
listEmpWfRequests
Queries the EmpWfRequest collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmpWfRequestsQueries | No | Queries to be sent with the request |
Returns: ListEmpWfRequestsResponse|error
Sample code:
ListEmpWfRequestsResponse result = check client->listEmpWfRequests();
Sample response:
{
"d": {
"results": [
{
"empWfRequestId": "1000"
}
]
}
}
getEmpWfRequest
Retrieves a single EmpWfRequest entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
empWfRequestId | int | Yes | key: empWfRequestId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmpWfRequestQueries | No | Queries to be sent with the request |
Returns: EmpWfRequest_1|error
Sample code:
EmpWfRequest_1 result = check client->getEmpWfRequest(empWfRequestId);
Sample response:
{
"d": {
"empWfRequestId": "1000"
}
}
WfRequest
listWfRequests
Queries the WfRequest collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListWfRequestsQueries | No | Queries to be sent with the request |
Returns: ListWfRequestsResponse|error
Sample code:
ListWfRequestsResponse result = check client->listWfRequests();
Sample response:
{
"d": {
"results": [
{
"wfRequestId": "1000",
"empWfRequestNav": {},
"parentWfRequestNav": {},
"wfRequestCommentsNav": {},
"wfRequestParticipatorNav": {},
"wfRequestStepNav": {},
"workflowAllowedActionListNav": {}
}
]
}
}
getWfRequest
Retrieves a single WfRequest entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
wfRequestId | int | Yes | key: wfRequestId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetWfRequestQueries | No | Queries to be sent with the request |
Returns: WfRequest_1|error
Sample code:
WfRequest_1 result = check client->getWfRequest(wfRequestId);
Sample response:
{
"d": {
"wfRequestId": "1000",
"empWfRequestNav": {
"empWfRequestId": "1000"
},
"parentWfRequestNav": {},
"wfRequestCommentsNav": {
"results": []
},
"wfRequestParticipatorNav": {
"results": []
},
"wfRequestStepNav": {
"results": []
},
"workflowAllowedActionListNav": {
"results": []
}
}
}
approveWfRequest
createapproveWfRequest
Creates a new approveWfRequest entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | CreateapproveWfRequestQueries | No | Queries to be sent with the request |
Returns: Result|error
Sample code:
Result result = check client->createapproveWfRequest();
Sample response:
{
"d": {
"results": [
{}
]
}
}
commentWfRequest
createcommentWfRequest
Creates a new commentWfRequest entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | CreatecommentWfRequestQueries | No | Queries to be sent with the request |
Returns: Result|error
Sample code:
Result result = check client->createcommentWfRequest();
Sample response:
{
"d": {
"results": [
{}
]
}
}
rejectWfRequest
createrejectWfRequest
Creates a new rejectWfRequest entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | CreaterejectWfRequestQueries | No | Queries to be sent with the request |
Returns: Result|error
Sample code:
Result result = check client->createrejectWfRequest();
Sample response:
{
"d": {
"results": [
{}
]
}
}
sendbackWfRequest
createsendbackWfRequest
Creates a new sendbackWfRequest entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | CreatesendbackWfRequestQueries | No | Queries to be sent with the request |
Returns: Result|error
Sample code:
Result result = check client->createsendbackWfRequest();
Sample response:
{
"d": {
"results": [
{}
]
}
}
getWorkflowPendingData
creategetWorkflowPendingData
Creates a new getWorkflowPendingData entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | CreategetWorkflowPendingDataQueries | No | Queries to be sent with the request |
Returns: Result_1|error
Sample code:
Result_1 result = check client->creategetWorkflowPendingData();
Sample response:
{
"d": {
"results": [
{
"wfRequestId": 0,
"workflowAttributeGroups": []
}
]
}
}
withdrawWfRequest
createwithdrawWfRequest
Creates a new withdrawWfRequest entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | CreatewithdrawWfRequestQueries | No | Queries to be sent with the request |
Returns: Result|error
Sample code:
Result result = check client->createwithdrawWfRequest();
Sample response:
{
"d": {
"results": [
{}
]
}
}