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 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.

Quantity specification supported: NO

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
Specify #{userId} to substitute the currently logged-in user’s ID.
triggerNamestring
~ 128 charsTrigger name
Unique Trigger name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
verifyTypestring (enum)
enum {
  “notTriggerd”,
  “elapsed”,
  “notElapsed”
}
Type of verification
DefinitionDescription
“notTriggerd”Trigger not pulled
“elapsed”Elapsed time
“notElapsed”Not elapsed time
elapsedMinutesint{verifyType} in [“elapsed”, “notElapsed”]
✓*
0 ~ 2147483646Elapsed time (minutes)
* Required if verifyType is “elapsed”,“notElapsed”
timeOffsetTokenstring~ 1024 charsTime 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 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.

Quantity specification supported: NO

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
Specify #{userId} to substitute the currently logged-in user’s ID.
eventNamestring
~ 128 charsEvent name
Unique Event name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
verifyTypestring (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
timeOffsetTokenstring~ 1024 charsTime 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 User ID

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

Quantity specification supported: NO

Reversible action: NO

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
Specify #{userId} to substitute the currently logged-in user’s ID.
triggerNamestring
~ 128 charsTrigger name
Unique Trigger name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
timeOffsetTokenstring~ 1024 charsTime 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 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.

Quantity specification supported: NO

Reversible action: YES

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
triggerNamestring
~ 128 charsTrigger name
Unique Trigger name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
Specify #{userId} to substitute the currently logged-in user’s ID.
triggerStrategystring (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
ttlint{triggerStrategy} in [“renew”, “extend”, “drop”]
✓*
0 ~ 2147483646Trigger expiration time (seconds)
* Required if triggerStrategy is “renew”,“extend”,“drop”
eventIdstring{triggerStrategy} in [“repeatCycleEnd”, “repeatCycleNextStart”, “absoluteEnd”]
✓*
~ 1024 charsEvent GRN
* Required if triggerStrategy is “repeatCycleEnd”,“repeatCycleNextStart”,“absoluteEnd”
timeOffsetTokenstring~ 1024 charsTime 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 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.

Quantity specification supported: YES

Reversible action: NO

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
triggerNamestring
~ 128 charsTrigger name
Unique Trigger name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
Specify #{userId} to substitute the currently logged-in user’s ID.
extendSecondsint
0 ~ 2147483646Trigger extension period (seconds)
timeOffsetTokenstring~ 1024 charsTime 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",
})