GS2-Schedule Transaction Actions

Specification of verify/consume/acquire transaction actions

Verify Action

Gs2Schedule:VerifyTriggerByUserId

Verify the elapsed time since the Trigger was pulled by specifying a user ID

Verifies conditions related to the trigger’s state for the specified user. The verifyType can be: ’notTriggerd’, ’elapsed’, or ’notElapsed’. Returns an error if the verification condition is not met.

Supports quantity specification: NO

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userId string
~ 128 chars User ID
Specify #{userId} to substitute the currently logged-in user’s ID.
triggerName string
~ 128 chars Trigger name
Trigger-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
verifyType string (enum)
enum {
  “notTriggerd”,
  “elapsed”,
  “notElapsed”
}
Type of verification
DefinitionDescription
“notTriggerd”Trigger not pulled
“elapsed”Elapsed time
“notElapsed”Not elapsed time
elapsedMinutes int {verifyType} in [“elapsed”, “notElapsed”]
✓*
0 ~ 2147483646 Elapsed time (minutes)
* Required if verifyType is “elapsed”,“notElapsed”
timeOffsetToken string ~ 1024 chars Time offset token
{
    "action": "Gs2Schedule:VerifyTriggerByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "triggerName": "[string]Trigger name",
        "verifyType": "[string]Type of verification",
        "elapsedMinutes": "[int]Elapsed time (minutes)",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Schedule:VerifyTriggerByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  triggerName: "[string]Trigger name"
  verifyType: "[string]Type of verification"
  elapsedMinutes: "[int]Elapsed time (minutes)"
  timeOffsetToken: "[string]Time offset token"
transaction.service("schedule").verify.verify_trigger_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    triggerName="[string]Trigger name",
    verifyType="[string]Type of verification",
    elapsedMinutes="[int]Elapsed time (minutes)",
    timeOffsetToken="[string]Time offset token",
})

Gs2Schedule:VerifyEventByUserId

Verify whether the Event is active by specifying a user ID

Verifies whether the specified event is currently in its active schedule period for the specified user. The verifyType can be set to ‘inSchedule’ or ’notInSchedule’. Returns an error if the verification condition is not met.

Supports quantity specification: NO

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userId string
~ 128 chars User ID
Specify #{userId} to substitute the currently logged-in user’s ID.
eventName string
~ 128 chars Event name
Event-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
verifyType string (enum)
enum {
  “inSchedule”,
  “notInSchedule”
}
Type of verification
DefinitionDescription
“inSchedule”The event is in its active period
“notInSchedule”The event is not in its active period
timeOffsetToken string ~ 1024 chars Time offset token
{
    "action": "Gs2Schedule:VerifyEventByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "eventName": "[string]Event name",
        "verifyType": "[string]Type of verification",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Schedule:VerifyEventByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  eventName: "[string]Event name"
  verifyType: "[string]Type of verification"
  timeOffsetToken: "[string]Time offset token"
transaction.service("schedule").verify.verify_event_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    eventName="[string]Event name",
    verifyType="[string]Type of verification",
    timeOffsetToken="[string]Time offset token",
})

Consume Action

Gs2Schedule:DeleteTriggerByUserId

Delete Trigger by specifying a user ID

Deletes the specified trigger for the specified user. Deleting a trigger deactivates associated relative schedule events.

Supports quantity specification: NO

Whether the action is reversible: NO

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userId string
~ 128 chars User ID
Specify #{userId} to substitute the currently logged-in user’s ID.
triggerName string
~ 128 chars Trigger name
Trigger-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
timeOffsetToken string ~ 1024 chars Time offset token
{
    "action": "Gs2Schedule:DeleteTriggerByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "triggerName": "[string]Trigger name",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Schedule:DeleteTriggerByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  triggerName: "[string]Trigger name"
  timeOffsetToken: "[string]Time offset token"
transaction.service("schedule").consume.delete_trigger_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    triggerName="[string]Trigger name",
    timeOffsetToken="[string]Time offset token",
})

Acquire Action

Gs2Schedule:TriggerByUserId

Execute the Trigger by specifying a user ID

Pulls a trigger for the specified user. The trigger strategy determines behavior: ‘renew’ resets with new TTL, ’extend’ extends existing TTL, ‘drop’ ignores if already pulled, ‘repeatCycleEnd’/‘repeatCycleNextStart’/‘absoluteEnd’ aligns expiration with the specified event’s schedule. Pulling a trigger activates associated relative schedule events.

Supports quantity specification: NO

Whether the action is reversible: YES

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
triggerName string
~ 128 chars Trigger name
Trigger-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userId string
~ 128 chars User ID
Specify #{userId} to substitute the currently logged-in user’s ID.
triggerStrategy string (enum)
enum {
  “renew”,
  “extend”,
  “drop”,
  “repeatCycleEnd”,
  “repeatCycleNextStart”,
  “absoluteEnd”
}
Trigger Execution Policy
DefinitionDescription
“renew”Redraw with a new period if the trigger has already been pulled
“extend”Extend the period if the trigger has already been pulled
“drop”Ignore if the trigger has already been pulled
“repeatCycleEnd”Trigger to expire at the end of the repeat period of the specified event
“repeatCycleNextStart”Trigger to expire at the next repeat start date and time of the specified event
“absoluteEnd”Trigger to expire at the end date and time of the specified event
ttl int {triggerStrategy} in [“renew”, “extend”, “drop”]
✓*
0 ~ 2147483646 Trigger expiration time (seconds)
* Required if triggerStrategy is “renew”,“extend”,“drop”
eventId string {triggerStrategy} in [“repeatCycleEnd”, “repeatCycleNextStart”, “absoluteEnd”]
✓*
~ 1024 chars Event GRN
* Required if triggerStrategy is “repeatCycleEnd”,“repeatCycleNextStart”,“absoluteEnd”
timeOffsetToken string ~ 1024 chars Time offset token
{
    "action": "Gs2Schedule:TriggerByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "triggerName": "[string]Trigger name",
        "userId": "[string]User ID",
        "triggerStrategy": "[string]Trigger Execution Policy",
        "ttl": "[int]Trigger expiration time (seconds)",
        "eventId": "[string]Event GRN",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Schedule:TriggerByUserId
request:
  namespaceName: "[string]Namespace name"
  triggerName: "[string]Trigger name"
  userId: "[string]User ID"
  triggerStrategy: "[string]Trigger Execution Policy"
  ttl: "[int]Trigger expiration time (seconds)"
  eventId: "[string]Event GRN"
  timeOffsetToken: "[string]Time offset token"
transaction.service("schedule").acquire.trigger_by_user_id({
    namespaceName="[string]Namespace name",
    triggerName="[string]Trigger name",
    userId="[string]User ID",
    triggerStrategy="[string]Trigger Execution Policy",
    ttl="[int]Trigger expiration time (seconds)",
    eventId="[string]Event GRN",
    timeOffsetToken="[string]Time offset token",
})

Gs2Schedule:ExtendTriggerByUserId

Extend the period of a trigger by specifying a user ID

Extends the expiration period of an existing trigger for the specified user by the specified number of seconds. If the trigger does not exist, a new trigger is created with the specified extension period as its TTL.

Supports quantity specification: YES

Whether the action is reversible: NO

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
triggerName string
~ 128 chars Trigger name
Trigger-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userId string
~ 128 chars User ID
Specify #{userId} to substitute the currently logged-in user’s ID.
extendSeconds int
0 ~ 2147483646 Trigger extension period (seconds)
timeOffsetToken string ~ 1024 chars Time offset token
{
    "action": "Gs2Schedule:ExtendTriggerByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "triggerName": "[string]Trigger name",
        "userId": "[string]User ID",
        "extendSeconds": "[int]Trigger extension period (seconds)",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Schedule:ExtendTriggerByUserId
request:
  namespaceName: "[string]Namespace name"
  triggerName: "[string]Trigger name"
  userId: "[string]User ID"
  extendSeconds: "[int]Trigger extension period (seconds)"
  timeOffsetToken: "[string]Time offset token"
transaction.service("schedule").acquire.extend_trigger_by_user_id({
    namespaceName="[string]Namespace name",
    triggerName="[string]Trigger name",
    userId="[string]User ID",
    extendSeconds="[int]Trigger extension period (seconds)",
    timeOffsetToken="[string]Time offset token",
})