CycleService to Transfer an Activity Processing from PAS To Cycle
The CycleService REST API can be configured to allow a user (CSR) to transfer the activity processing from ActivityScreen of OIPA to the Cycle Agent. When an activity processing transfer is initiated by a user in OIPA, the CycleService REST service call implements the communication mode between OIPA and CYCLE.
- When ProcessByCycle attribute is configured with a value 'Yes' in a transaction, OIPA allows the user to transfer the activity processing from OIPA UI to the Cycle Agent through this web service. All the activities with an Effective Date less than or equal to the current system date can be transferred to the Cycle Agent for processing.
- When the ProcessByCycle attribute value is set to 'No', the user will not be able to transfer the activities to the Cycle for processing. This is the default behavior.
Activity Type Codes
- This feature is applicable for the activity types such as, Type Code 01 - Natural and Type Code 04 - Redo, that are in Pending status.
- The other activity types such as Type code 02- reversal and Type Code 03 - Undo, cannot be transferred to the Cycle for processing by the user. This includes the activity status such as, Shadowed, Pending Shadowed, NUV Pending, Gain/Loss Pending, Queued, and Requirements Pending.
CycleService
When a user transfers the activity processing from OIPA UI to the Cycle Agent, the CycleService REST service call is invoked and handles the communication between OIPA and CYCLE. When the service is triggered, the system creates an entry in the ASCYCLE table and returns the CycleGUID. For security, the system implements role-based authorization to process the activities.
Note: The REST service, CycleService is created in the AsAuthWebService table, with SubmitTask as a webservice method.
SubmitTask
The method SubmitTask can be configured as a user initiating request and must be part of the OIPA web service security in the Rules Palette. When the service is triggered, "ClientNumber and "PersonalId" are sent in the HTTPS header request (username and password). If the user is not authorized for the web service security used for the activity, the system displays an error message.
Method:POST
The SubmitTask POST request submits a payload request to the Cycle server and returns a CycleGUID.
URI: /CycleService/rest/services/submitTask
Parameter | Description (Mandatory/Optional) |
---|---|
cycleLevel | Mandatory |
activityId | Optional |
processAll | Optional. Default value - No |
activityId | Activity GUID |
companyId | Optional element |
Sample Payload |
---|
{ "cycleLevel" : 03, "cycleAction" : null "processAll" : false "activityId" : 8DCB7EFC-B0B5-4701-9204-FC651B7E2B8D, "companyId" : null } |
Response
HTTP Status Code 201- Created along with CycleGUID
System Properties
The following properties should be configured to implement this feature.
PAS properties
- cycle.baseURI
- cycle.trustStore
- cycle.trustStorePassword
Cycle Web Properties
- cycle.batchSize
- cycle.period
- cycle.groupSize
- cycle.updateStatsRun
- cycle.updateStatsDegree
- application.X-Frame-Options
- application.AccessControlAllowOrigin
Activity Processing
The activities are processed based on its position and order of the sequence of the pending activities that are present in the ActivityScreen.
When a user clicks Process All, all the pending activities in the ActivityScreen are processed sequentially. The system sets the flag, ProcessAll to Yes in the payload of POST request and submits this task to the Cycle. In this case, the activities are processed in OIPA or in Cycle based on the following conditions:
- the value of the ProcessByCycle (Yes/No) attribute
- the position and order of the sequence of the pending activities in the ActivityScreen.
In an activity sequence, when there is a transaction that is configured with ProcessByCycle=No comes before a transaction that is configured with ProcessByCycle = Yes, then the transaction with ProcessByCycle=No is processed in OIPA. The process repeats until the processing reaches to an activity that is configured with ProcessByCycle = Yes, in the sequence; after which all the activities with dates up to the System Date and with ProcessByCycle = Yes, are sent to the Cycle for processing.
The activity that has been transferred to the Cycle, may spawn other activities to be executed in the current execution thread. In this case, The ACTIVITYGUID for activities which are spawned by parent activity with 'ProcessByCycle = Yes' and with effective date prior to system date, are stored in the ASCYCLEDETAIL table with the same CYCLEGUID as for the parent activity.