tasker-engine 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (605) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +22 -0
  3. data/README.md +443 -0
  4. data/Rakefile +10 -0
  5. data/app/controllers/tasker/analytics_controller.rb +179 -0
  6. data/app/controllers/tasker/application_controller.rb +45 -0
  7. data/app/controllers/tasker/graphql_controller.rb +193 -0
  8. data/app/controllers/tasker/handlers_controller.rb +217 -0
  9. data/app/controllers/tasker/health_controller.rb +229 -0
  10. data/app/controllers/tasker/metrics_controller.rb +111 -0
  11. data/app/controllers/tasker/page_sort.rb +97 -0
  12. data/app/controllers/tasker/task_diagrams_controller.rb +30 -0
  13. data/app/controllers/tasker/tasks_controller.rb +123 -0
  14. data/app/controllers/tasker/workflow_steps_controller.rb +69 -0
  15. data/app/graphql/examples/all_tasks.graphql +22 -0
  16. data/app/graphql/examples/pending_tasks.graphql +23 -0
  17. data/app/graphql/tasker/graph_ql_types/annotation_type.rb +14 -0
  18. data/app/graphql/tasker/graph_ql_types/base_argument.rb +9 -0
  19. data/app/graphql/tasker/graph_ql_types/base_connection.rb +11 -0
  20. data/app/graphql/tasker/graph_ql_types/base_edge.rb +10 -0
  21. data/app/graphql/tasker/graph_ql_types/base_enum.rb +9 -0
  22. data/app/graphql/tasker/graph_ql_types/base_field.rb +10 -0
  23. data/app/graphql/tasker/graph_ql_types/base_input_object.rb +10 -0
  24. data/app/graphql/tasker/graph_ql_types/base_interface.rb +14 -0
  25. data/app/graphql/tasker/graph_ql_types/base_object.rb +10 -0
  26. data/app/graphql/tasker/graph_ql_types/base_scalar.rb +9 -0
  27. data/app/graphql/tasker/graph_ql_types/base_union.rb +11 -0
  28. data/app/graphql/tasker/graph_ql_types/dependent_system_object_map_type.rb +18 -0
  29. data/app/graphql/tasker/graph_ql_types/dependent_system_type.rb +13 -0
  30. data/app/graphql/tasker/graph_ql_types/mutation_type.rb +16 -0
  31. data/app/graphql/tasker/graph_ql_types/named_step_type.rb +16 -0
  32. data/app/graphql/tasker/graph_ql_types/named_task_type.rb +14 -0
  33. data/app/graphql/tasker/graph_ql_types/named_tasks_named_step_type.rb +19 -0
  34. data/app/graphql/tasker/graph_ql_types/node_type.rb +12 -0
  35. data/app/graphql/tasker/graph_ql_types/query_type.rb +20 -0
  36. data/app/graphql/tasker/graph_ql_types/task_annotation_type.rb +17 -0
  37. data/app/graphql/tasker/graph_ql_types/task_interface.rb +17 -0
  38. data/app/graphql/tasker/graph_ql_types/task_type.rb +26 -0
  39. data/app/graphql/tasker/graph_ql_types/workflow_step_type.rb +154 -0
  40. data/app/graphql/tasker/graph_ql_types.rb +42 -0
  41. data/app/graphql/tasker/mutations/base_mutation.rb +13 -0
  42. data/app/graphql/tasker/mutations/cancel_step.rb +29 -0
  43. data/app/graphql/tasker/mutations/cancel_task.rb +29 -0
  44. data/app/graphql/tasker/mutations/create_task.rb +52 -0
  45. data/app/graphql/tasker/mutations/update_step.rb +36 -0
  46. data/app/graphql/tasker/mutations/update_task.rb +41 -0
  47. data/app/graphql/tasker/queries/all_annotation_types.rb +17 -0
  48. data/app/graphql/tasker/queries/all_tasks.rb +23 -0
  49. data/app/graphql/tasker/queries/base_query.rb +9 -0
  50. data/app/graphql/tasker/queries/helpers.rb +16 -0
  51. data/app/graphql/tasker/queries/one_step.rb +24 -0
  52. data/app/graphql/tasker/queries/one_task.rb +18 -0
  53. data/app/graphql/tasker/queries/tasks_by_annotation.rb +31 -0
  54. data/app/graphql/tasker/queries/tasks_by_status.rb +30 -0
  55. data/app/graphql/tasker/tasker_rails_schema.rb +52 -0
  56. data/app/jobs/tasker/application_job.rb +8 -0
  57. data/app/jobs/tasker/metrics_export_job.rb +252 -0
  58. data/app/jobs/tasker/task_runner_job.rb +224 -0
  59. data/app/models/tasker/annotation_type.rb +26 -0
  60. data/app/models/tasker/application_record.rb +70 -0
  61. data/app/models/tasker/dependent_system.rb +26 -0
  62. data/app/models/tasker/dependent_system_object_map.rb +64 -0
  63. data/app/models/tasker/diagram/edge.rb +106 -0
  64. data/app/models/tasker/diagram/flowchart.rb +137 -0
  65. data/app/models/tasker/diagram/node.rb +99 -0
  66. data/app/models/tasker/named_step.rb +41 -0
  67. data/app/models/tasker/named_task.rb +121 -0
  68. data/app/models/tasker/named_tasks_named_step.rb +82 -0
  69. data/app/models/tasker/step_dag_relationship.rb +65 -0
  70. data/app/models/tasker/step_readiness_status.rb +59 -0
  71. data/app/models/tasker/task.rb +424 -0
  72. data/app/models/tasker/task_annotation.rb +36 -0
  73. data/app/models/tasker/task_diagram.rb +332 -0
  74. data/app/models/tasker/task_execution_context.rb +29 -0
  75. data/app/models/tasker/task_namespace.rb +41 -0
  76. data/app/models/tasker/task_transition.rb +235 -0
  77. data/app/models/tasker/workflow_step.rb +461 -0
  78. data/app/models/tasker/workflow_step_edge.rb +94 -0
  79. data/app/models/tasker/workflow_step_transition.rb +434 -0
  80. data/app/serializers/tasker/annotation_type_serializer.rb +8 -0
  81. data/app/serializers/tasker/handler_serializer.rb +109 -0
  82. data/app/serializers/tasker/task_annotation_serializer.rb +32 -0
  83. data/app/serializers/tasker/task_serializer.rb +168 -0
  84. data/app/serializers/tasker/workflow_step_serializer.rb +27 -0
  85. data/app/services/tasker/analytics_service.rb +409 -0
  86. data/app/views/tasker/task/_diagram.html.erb +32 -0
  87. data/config/initializers/dry_struct.rb +11 -0
  88. data/config/initializers/statesman.rb +6 -0
  89. data/config/initializers/tasker_orchestration.rb +17 -0
  90. data/config/initializers/time_formats.rb +4 -0
  91. data/config/routes.rb +34 -0
  92. data/config/tasker/subscriptions/example_integrations.yml +67 -0
  93. data/config/tasker/system_events.yml +305 -0
  94. data/db/functions/calculate_dependency_levels_v01.sql +45 -0
  95. data/db/functions/get_analytics_metrics_v01.sql +137 -0
  96. data/db/functions/get_slowest_steps_v01.sql +82 -0
  97. data/db/functions/get_slowest_tasks_v01.sql +96 -0
  98. data/db/functions/get_step_readiness_status_batch_v01.sql +140 -0
  99. data/db/functions/get_step_readiness_status_v01.sql +139 -0
  100. data/db/functions/get_system_health_counts_v01.sql +108 -0
  101. data/db/functions/get_task_execution_context_v01.sql +108 -0
  102. data/db/functions/get_task_execution_contexts_batch_v01.sql +104 -0
  103. data/db/init/schema.sql +2277 -0
  104. data/db/migrate/20250701165431_initial_tasker_schema.rb +116 -0
  105. data/db/views/tasker_step_dag_relationships_v01.sql +69 -0
  106. data/docs/APPLICATION_GENERATOR.md +384 -0
  107. data/docs/AUTH.md +1780 -0
  108. data/docs/CIRCUIT_BREAKER.md +224 -0
  109. data/docs/DEVELOPER_GUIDE.md +2665 -0
  110. data/docs/EVENT_SYSTEM.md +637 -0
  111. data/docs/EXECUTION_CONFIGURATION.md +341 -0
  112. data/docs/FLOW_CHART.md +149 -0
  113. data/docs/HEALTH.md +542 -0
  114. data/docs/METRICS.md +731 -0
  115. data/docs/OPTIMIZATION_PLAN.md +1479 -0
  116. data/docs/OVERVIEW.md +552 -0
  117. data/docs/QUICK_START.md +270 -0
  118. data/docs/REGISTRY_SYSTEMS.md +373 -0
  119. data/docs/REST_API.md +632 -0
  120. data/docs/ROADMAP.md +221 -0
  121. data/docs/SQL_FUNCTIONS.md +1408 -0
  122. data/docs/TASK_DIAGRAM.md +252 -0
  123. data/docs/TASK_EXECUTION_CONTROL_FLOW.md +237 -0
  124. data/docs/TELEMETRY.md +795 -0
  125. data/docs/TROUBLESHOOTING.md +756 -0
  126. data/docs/TaskHandlerGenerator.html +255 -0
  127. data/docs/Tasker/Analysis/RuntimeGraphAnalyzer.html +907 -0
  128. data/docs/Tasker/Analysis/TemplateGraphAnalyzer.html +1236 -0
  129. data/docs/Tasker/Analysis.html +117 -0
  130. data/docs/Tasker/AnalyticsController.html +450 -0
  131. data/docs/Tasker/AnalyticsService/BottleneckAnalytics.html +816 -0
  132. data/docs/Tasker/AnalyticsService/PerformanceAnalytics.html +586 -0
  133. data/docs/Tasker/AnalyticsService.html +2221 -0
  134. data/docs/Tasker/AnnotationType.html +137 -0
  135. data/docs/Tasker/AnnotationTypeSerializer.html +124 -0
  136. data/docs/Tasker/ApplicationController.html +147 -0
  137. data/docs/Tasker/ApplicationJob.html +128 -0
  138. data/docs/Tasker/ApplicationRecord.html +378 -0
  139. data/docs/Tasker/Authentication/AuthenticationError.html +124 -0
  140. data/docs/Tasker/Authentication/ConfigurationError.html +124 -0
  141. data/docs/Tasker/Authentication/Coordinator.html +242 -0
  142. data/docs/Tasker/Authentication/Interface.html +560 -0
  143. data/docs/Tasker/Authentication/InterfaceError.html +124 -0
  144. data/docs/Tasker/Authentication/NoneAuthenticator.html +338 -0
  145. data/docs/Tasker/Authentication.html +119 -0
  146. data/docs/Tasker/Authorization/AuthorizationError.html +139 -0
  147. data/docs/Tasker/Authorization/BaseCoordinator.html +927 -0
  148. data/docs/Tasker/Authorization/ConfigurationError.html +153 -0
  149. data/docs/Tasker/Authorization/ResourceConstants/ACTIONS.html +428 -0
  150. data/docs/Tasker/Authorization/ResourceConstants/RESOURCES.html +365 -0
  151. data/docs/Tasker/Authorization/ResourceConstants.html +146 -0
  152. data/docs/Tasker/Authorization/ResourceRegistry.html +882 -0
  153. data/docs/Tasker/Authorization/UnauthorizedError.html +153 -0
  154. data/docs/Tasker/Authorization.html +582 -0
  155. data/docs/Tasker/CacheCapabilities.html +167 -0
  156. data/docs/Tasker/CacheStrategy.html +1297 -0
  157. data/docs/Tasker/Concerns/Authenticatable.html +116 -0
  158. data/docs/Tasker/Concerns/Authorizable/AdminStatusChecker.html +256 -0
  159. data/docs/Tasker/Concerns/Authorizable.html +816 -0
  160. data/docs/Tasker/Concerns/ControllerAuthorizable.html +157 -0
  161. data/docs/Tasker/Concerns/EventPublisher.html +4023 -0
  162. data/docs/Tasker/Concerns/IdempotentStateTransitions.html +806 -0
  163. data/docs/Tasker/Concerns/LifecycleEventHelpers.html +129 -0
  164. data/docs/Tasker/Concerns/OrchestrationPublisher.html +129 -0
  165. data/docs/Tasker/Concerns/StateMachineBase/ClassMethods.html +1075 -0
  166. data/docs/Tasker/Concerns/StateMachineBase/StateMachineBase/ClassMethods.html +191 -0
  167. data/docs/Tasker/Concerns/StateMachineBase/StateMachineBase.html +126 -0
  168. data/docs/Tasker/Concerns/StateMachineBase.html +153 -0
  169. data/docs/Tasker/Concerns/StructuredLogging.html +1413 -0
  170. data/docs/Tasker/Concerns.html +117 -0
  171. data/docs/Tasker/Configuration/AuthConfiguration.html +1023 -0
  172. data/docs/Tasker/Configuration/ConfigurationProxy.html +581 -0
  173. data/docs/Tasker/Configuration/DatabaseConfiguration.html +475 -0
  174. data/docs/Tasker/Configuration/EngineConfiguration.html +1265 -0
  175. data/docs/Tasker/Configuration/HealthConfiguration.html +791 -0
  176. data/docs/Tasker/Configuration/TelemetryConfiguration.html +1308 -0
  177. data/docs/Tasker/Configuration/TelemetryConfigurationProxy.html +388 -0
  178. data/docs/Tasker/Configuration.html +1669 -0
  179. data/docs/Tasker/ConfigurationError.html +143 -0
  180. data/docs/Tasker/ConfiguredTask.html +514 -0
  181. data/docs/Tasker/Constants/EventDefinitions.html +590 -0
  182. data/docs/Tasker/Constants/LifecycleEvents.html +137 -0
  183. data/docs/Tasker/Constants/ObservabilityEvents/Step.html +152 -0
  184. data/docs/Tasker/Constants/ObservabilityEvents/Task.html +142 -0
  185. data/docs/Tasker/Constants/ObservabilityEvents.html +126 -0
  186. data/docs/Tasker/Constants/RegistryEvents.html +285 -0
  187. data/docs/Tasker/Constants/StepEvents.html +177 -0
  188. data/docs/Tasker/Constants/TaskEvents.html +167 -0
  189. data/docs/Tasker/Constants/TaskExecution/ExecutionStatus.html +207 -0
  190. data/docs/Tasker/Constants/TaskExecution/HealthStatus.html +191 -0
  191. data/docs/Tasker/Constants/TaskExecution/RecommendedAction.html +207 -0
  192. data/docs/Tasker/Constants/TaskExecution.html +126 -0
  193. data/docs/Tasker/Constants/TaskFinalization/ErrorMessages.html +132 -0
  194. data/docs/Tasker/Constants/TaskFinalization/PendingReasons.html +207 -0
  195. data/docs/Tasker/Constants/TaskFinalization/ReenqueueReasons.html +239 -0
  196. data/docs/Tasker/Constants/TaskFinalization.html +126 -0
  197. data/docs/Tasker/Constants/TaskStatuses.html +223 -0
  198. data/docs/Tasker/Constants/TestEvents.html +163 -0
  199. data/docs/Tasker/Constants/WorkflowEvents.html +222 -0
  200. data/docs/Tasker/Constants/WorkflowStepStatuses.html +223 -0
  201. data/docs/Tasker/Constants.html +561 -0
  202. data/docs/Tasker/DependentSystem.html +137 -0
  203. data/docs/Tasker/DependentSystemObjectMap.html +250 -0
  204. data/docs/Tasker/DetectorRegistry.html +598 -0
  205. data/docs/Tasker/Diagram/Edge.html +1191 -0
  206. data/docs/Tasker/Diagram/Flowchart.html +1539 -0
  207. data/docs/Tasker/Diagram/Node.html +1165 -0
  208. data/docs/Tasker/Diagram.html +117 -0
  209. data/docs/Tasker/Engine.html +215 -0
  210. data/docs/Tasker/Error.html +139 -0
  211. data/docs/Tasker/Events/Bus.html +1226 -0
  212. data/docs/Tasker/Events/Catalog/CatalogPrinter.html +258 -0
  213. data/docs/Tasker/Events/Catalog/CustomEventRegistrar.html +276 -0
  214. data/docs/Tasker/Events/Catalog/ExamplePayloadGenerator.html +294 -0
  215. data/docs/Tasker/Events/Catalog.html +1291 -0
  216. data/docs/Tasker/Events/CustomRegistry.html +943 -0
  217. data/docs/Tasker/Events/DefinitionLoader.html +575 -0
  218. data/docs/Tasker/Events/EventPayloadBuilder/ErrorInfoExtractor.html +286 -0
  219. data/docs/Tasker/Events/EventPayloadBuilder/StepPayloadBuilder.html +312 -0
  220. data/docs/Tasker/Events/EventPayloadBuilder.html +664 -0
  221. data/docs/Tasker/Events/Publisher.html +365 -0
  222. data/docs/Tasker/Events/Subscribers/BaseSubscriber/ErrorCategorizer/ErrorTypeClassifier.html +1128 -0
  223. data/docs/Tasker/Events/Subscribers/BaseSubscriber/ErrorCategorizer.html +270 -0
  224. data/docs/Tasker/Events/Subscribers/BaseSubscriber/MetricTagsExtractor.html +266 -0
  225. data/docs/Tasker/Events/Subscribers/BaseSubscriber.html +2556 -0
  226. data/docs/Tasker/Events/Subscribers/MetricsSubscriber.html +723 -0
  227. data/docs/Tasker/Events/Subscribers/TelemetrySubscriber.html +2251 -0
  228. data/docs/Tasker/Events/Subscribers.html +117 -0
  229. data/docs/Tasker/Events/SubscriptionLoader.html +493 -0
  230. data/docs/Tasker/Events.html +294 -0
  231. data/docs/Tasker/EventsGenerator.html +459 -0
  232. data/docs/Tasker/Functions/FunctionBasedAnalyticsMetrics/AnalyticsMetrics.html +135 -0
  233. data/docs/Tasker/Functions/FunctionBasedAnalyticsMetrics.html +412 -0
  234. data/docs/Tasker/Functions/FunctionBasedDependencyLevels.html +598 -0
  235. data/docs/Tasker/Functions/FunctionBasedSlowestSteps/SlowestStep.html +135 -0
  236. data/docs/Tasker/Functions/FunctionBasedSlowestSteps.html +453 -0
  237. data/docs/Tasker/Functions/FunctionBasedSlowestTasks/SlowestTask.html +135 -0
  238. data/docs/Tasker/Functions/FunctionBasedSlowestTasks.html +453 -0
  239. data/docs/Tasker/Functions/FunctionBasedStepReadinessStatus.html +1457 -0
  240. data/docs/Tasker/Functions/FunctionBasedSystemHealthCounts/HealthMetrics.html +135 -0
  241. data/docs/Tasker/Functions/FunctionBasedSystemHealthCounts.html +370 -0
  242. data/docs/Tasker/Functions/FunctionBasedTaskExecutionContext.html +1250 -0
  243. data/docs/Tasker/Functions/FunctionWrapper.html +479 -0
  244. data/docs/Tasker/Functions.html +117 -0
  245. data/docs/Tasker/Generators/AuthenticatorGenerator/UsageInstructionsFormatter.html +244 -0
  246. data/docs/Tasker/Generators/AuthenticatorGenerator.html +373 -0
  247. data/docs/Tasker/Generators/AuthorizationCoordinatorGenerator.html +430 -0
  248. data/docs/Tasker/Generators/SubscriberGenerator.html +377 -0
  249. data/docs/Tasker/Generators/TaskHandlerGenerator.html +263 -0
  250. data/docs/Tasker/Generators.html +117 -0
  251. data/docs/Tasker/GraphQLTypes/AnnotationType.html +132 -0
  252. data/docs/Tasker/GraphQLTypes/BaseArgument.html +124 -0
  253. data/docs/Tasker/GraphQLTypes/BaseConnection.html +124 -0
  254. data/docs/Tasker/GraphQLTypes/BaseEdge.html +130 -0
  255. data/docs/Tasker/GraphQLTypes/BaseEnum.html +124 -0
  256. data/docs/Tasker/GraphQLTypes/BaseField.html +124 -0
  257. data/docs/Tasker/GraphQLTypes/BaseInputObject.html +124 -0
  258. data/docs/Tasker/GraphQLTypes/BaseInterface.html +116 -0
  259. data/docs/Tasker/GraphQLTypes/BaseObject.html +128 -0
  260. data/docs/Tasker/GraphQLTypes/BaseScalar.html +124 -0
  261. data/docs/Tasker/GraphQLTypes/BaseUnion.html +124 -0
  262. data/docs/Tasker/GraphQLTypes/DependentSystemObjectMapType.html +132 -0
  263. data/docs/Tasker/GraphQLTypes/DependentSystemType.html +132 -0
  264. data/docs/Tasker/GraphQLTypes/MutationType.html +132 -0
  265. data/docs/Tasker/GraphQLTypes/NamedStepType.html +132 -0
  266. data/docs/Tasker/GraphQLTypes/NamedTaskType.html +132 -0
  267. data/docs/Tasker/GraphQLTypes/NamedTasksNamedStepType.html +132 -0
  268. data/docs/Tasker/GraphQLTypes/NodeType.html +118 -0
  269. data/docs/Tasker/GraphQLTypes/QueryType.html +139 -0
  270. data/docs/Tasker/GraphQLTypes/TaskAnnotationType.html +132 -0
  271. data/docs/Tasker/GraphQLTypes/TaskInterface.html +111 -0
  272. data/docs/Tasker/GraphQLTypes/TaskType.html +201 -0
  273. data/docs/Tasker/GraphQLTypes/WorkflowStepType.html +694 -0
  274. data/docs/Tasker/GraphQLTypes.html +130 -0
  275. data/docs/Tasker/GraphqlController.html +251 -0
  276. data/docs/Tasker/HandlerFactory.html +1518 -0
  277. data/docs/Tasker/HandlerSerializer.html +682 -0
  278. data/docs/Tasker/HandlersController.html +574 -0
  279. data/docs/Tasker/HashIdentityStrategy.html +278 -0
  280. data/docs/Tasker/Health/ReadinessChecker.html +712 -0
  281. data/docs/Tasker/Health/StatusChecker.html +653 -0
  282. data/docs/Tasker/Health.html +117 -0
  283. data/docs/Tasker/HealthController.html +523 -0
  284. data/docs/Tasker/IdentityStrategy.html +276 -0
  285. data/docs/Tasker/InvalidTaskHandlerConfig.html +135 -0
  286. data/docs/Tasker/LifecycleEvents/Events/Step.html +162 -0
  287. data/docs/Tasker/LifecycleEvents/Events/Task.html +162 -0
  288. data/docs/Tasker/LifecycleEvents/Events.html +204 -0
  289. data/docs/Tasker/LifecycleEvents/Publisher.html +132 -0
  290. data/docs/Tasker/LifecycleEvents.html +799 -0
  291. data/docs/Tasker/Logging/CorrelationIdGenerator.html +688 -0
  292. data/docs/Tasker/Logging.html +115 -0
  293. data/docs/Tasker/MetricsController.html +293 -0
  294. data/docs/Tasker/MetricsExportJob.html +414 -0
  295. data/docs/Tasker/Mutations/BaseMutation.html +128 -0
  296. data/docs/Tasker/Mutations/CancelStep.html +219 -0
  297. data/docs/Tasker/Mutations/CancelTask.html +221 -0
  298. data/docs/Tasker/Mutations/CreateTask.html +243 -0
  299. data/docs/Tasker/Mutations/UpdateStep.html +243 -0
  300. data/docs/Tasker/Mutations/UpdateTask.html +243 -0
  301. data/docs/Tasker/Mutations.html +117 -0
  302. data/docs/Tasker/NamedStep.html +216 -0
  303. data/docs/Tasker/NamedTask.html +910 -0
  304. data/docs/Tasker/NamedTasksNamedStep.html +435 -0
  305. data/docs/Tasker/Orchestration/BackoffCalculator.html +404 -0
  306. data/docs/Tasker/Orchestration/ConnectionBuilder/ConfigValidator.html +258 -0
  307. data/docs/Tasker/Orchestration/ConnectionBuilder.html +435 -0
  308. data/docs/Tasker/Orchestration/ConnectionPoolIntelligence.html +513 -0
  309. data/docs/Tasker/Orchestration/Coordinator.html +641 -0
  310. data/docs/Tasker/Orchestration/FutureStateAnalyzer.html +1045 -0
  311. data/docs/Tasker/Orchestration/Orchestrator.html +679 -0
  312. data/docs/Tasker/Orchestration/PluginIntegration.html +1127 -0
  313. data/docs/Tasker/Orchestration/ResponseProcessor.html +504 -0
  314. data/docs/Tasker/Orchestration/RetryHeaderParser.html +304 -0
  315. data/docs/Tasker/Orchestration/StepExecutor.html +995 -0
  316. data/docs/Tasker/Orchestration/StepSequenceFactory.html +644 -0
  317. data/docs/Tasker/Orchestration/TaskFinalizer/BlockageChecker.html +264 -0
  318. data/docs/Tasker/Orchestration/TaskFinalizer/ContextManager.html +254 -0
  319. data/docs/Tasker/Orchestration/TaskFinalizer/DelayCalculator.html +556 -0
  320. data/docs/Tasker/Orchestration/TaskFinalizer/FinalizationDecisionMaker.html +348 -0
  321. data/docs/Tasker/Orchestration/TaskFinalizer/FinalizationProcessor.html +286 -0
  322. data/docs/Tasker/Orchestration/TaskFinalizer/ReasonDeterminer.html +432 -0
  323. data/docs/Tasker/Orchestration/TaskFinalizer/ReenqueueManager.html +296 -0
  324. data/docs/Tasker/Orchestration/TaskFinalizer/UnclearStateHandler.html +314 -0
  325. data/docs/Tasker/Orchestration/TaskFinalizer.html +1212 -0
  326. data/docs/Tasker/Orchestration/TaskInitializer.html +766 -0
  327. data/docs/Tasker/Orchestration/TaskReenqueuer.html +506 -0
  328. data/docs/Tasker/Orchestration/ViableStepDiscovery.html +442 -0
  329. data/docs/Tasker/Orchestration/WorkflowCoordinator.html +510 -0
  330. data/docs/Tasker/Orchestration.html +130 -0
  331. data/docs/Tasker/PageSort/PageSortParamsBuilder.html +296 -0
  332. data/docs/Tasker/PageSort.html +247 -0
  333. data/docs/Tasker/PermanentError.html +518 -0
  334. data/docs/Tasker/ProceduralError.html +147 -0
  335. data/docs/Tasker/Queries/AllAnnotationTypes.html +217 -0
  336. data/docs/Tasker/Queries/AllTasks.html +221 -0
  337. data/docs/Tasker/Queries/BaseQuery.html +128 -0
  338. data/docs/Tasker/Queries/Helpers.html +187 -0
  339. data/docs/Tasker/Queries/OneStep.html +225 -0
  340. data/docs/Tasker/Queries/OneTask.html +217 -0
  341. data/docs/Tasker/Queries/TasksByAnnotation.html +231 -0
  342. data/docs/Tasker/Queries/TasksByStatus.html +233 -0
  343. data/docs/Tasker/Queries.html +119 -0
  344. data/docs/Tasker/Railtie.html +124 -0
  345. data/docs/Tasker/Registry/BaseRegistry.html +1690 -0
  346. data/docs/Tasker/Registry/EventPublisher.html +667 -0
  347. data/docs/Tasker/Registry/InterfaceValidator.html +569 -0
  348. data/docs/Tasker/Registry/RegistrationError.html +132 -0
  349. data/docs/Tasker/Registry/RegistryError.html +139 -0
  350. data/docs/Tasker/Registry/StatisticsCollector.html +841 -0
  351. data/docs/Tasker/Registry/SubscriberRegistry.html +1504 -0
  352. data/docs/Tasker/Registry/ValidationError.html +132 -0
  353. data/docs/Tasker/Registry.html +119 -0
  354. data/docs/Tasker/RetryableError.html +515 -0
  355. data/docs/Tasker/StateMachine/Compatibility.html +282 -0
  356. data/docs/Tasker/StateMachine/InvalidStateTransition.html +135 -0
  357. data/docs/Tasker/StateMachine/StepStateMachine/StandardizedPayloadBuilder.html +260 -0
  358. data/docs/Tasker/StateMachine/StepStateMachine.html +2215 -0
  359. data/docs/Tasker/StateMachine/TaskStateMachine.html +734 -0
  360. data/docs/Tasker/StateMachine.html +602 -0
  361. data/docs/Tasker/StepDagRelationship.html +657 -0
  362. data/docs/Tasker/StepHandler/Api/Config.html +1091 -0
  363. data/docs/Tasker/StepHandler/Api.html +884 -0
  364. data/docs/Tasker/StepHandler/AutomaticEventPublishing.html +321 -0
  365. data/docs/Tasker/StepHandler/Base.html +970 -0
  366. data/docs/Tasker/StepHandler.html +119 -0
  367. data/docs/Tasker/StepReadinessStatus.html +836 -0
  368. data/docs/Tasker/Task.html +2575 -0
  369. data/docs/Tasker/TaskAnnotation.html +137 -0
  370. data/docs/Tasker/TaskAnnotationSerializer.html +124 -0
  371. data/docs/Tasker/TaskBuilder/StepNameValidator.html +264 -0
  372. data/docs/Tasker/TaskBuilder/StepTemplateDefiner.html +264 -0
  373. data/docs/Tasker/TaskBuilder.html +764 -0
  374. data/docs/Tasker/TaskDiagram/StepToStepEdgeBuilder.html +260 -0
  375. data/docs/Tasker/TaskDiagram/TaskToRootStepEdgeBuilder.html +290 -0
  376. data/docs/Tasker/TaskDiagram.html +548 -0
  377. data/docs/Tasker/TaskDiagramsController.html +240 -0
  378. data/docs/Tasker/TaskExecutionContext.html +469 -0
  379. data/docs/Tasker/TaskHandler/ClassMethods/StepTemplateDefiner/ClassBasedEventRegistrar.html +238 -0
  380. data/docs/Tasker/TaskHandler/ClassMethods/StepTemplateDefiner/YamlEventRegistrar.html +254 -0
  381. data/docs/Tasker/TaskHandler/ClassMethods/StepTemplateDefiner.html +988 -0
  382. data/docs/Tasker/TaskHandler/ClassMethods.html +357 -0
  383. data/docs/Tasker/TaskHandler/InstanceMethods.html +1396 -0
  384. data/docs/Tasker/TaskHandler/StepGroup.html +1748 -0
  385. data/docs/Tasker/TaskHandler.html +271 -0
  386. data/docs/Tasker/TaskNamespace.html +312 -0
  387. data/docs/Tasker/TaskRunnerJob.html +406 -0
  388. data/docs/Tasker/TaskSerializer.html +474 -0
  389. data/docs/Tasker/TaskTransition.html +1517 -0
  390. data/docs/Tasker/TaskWorkflowSummary.html +988 -0
  391. data/docs/Tasker/TaskerRailsSchema/InvalidObjectTypeError.html +132 -0
  392. data/docs/Tasker/TaskerRailsSchema/TypeResolutionError.html +139 -0
  393. data/docs/Tasker/TaskerRailsSchema/UnknownInterfaceError.html +132 -0
  394. data/docs/Tasker/TaskerRailsSchema.html +384 -0
  395. data/docs/Tasker/TasksController.html +595 -0
  396. data/docs/Tasker/Telemetry/EventMapping.html +1307 -0
  397. data/docs/Tasker/Telemetry/EventRouter.html +2178 -0
  398. data/docs/Tasker/Telemetry/Events/ExportEvents.html +246 -0
  399. data/docs/Tasker/Telemetry/Events.html +115 -0
  400. data/docs/Tasker/Telemetry/ExportCoordinator/DistributedLockTimeoutError.html +135 -0
  401. data/docs/Tasker/Telemetry/ExportCoordinator.html +2137 -0
  402. data/docs/Tasker/Telemetry/IntelligentCacheManager.html +1083 -0
  403. data/docs/Tasker/Telemetry/LogBackend.html +1088 -0
  404. data/docs/Tasker/Telemetry/MetricTypes/Counter.html +1054 -0
  405. data/docs/Tasker/Telemetry/MetricTypes/Gauge.html +1270 -0
  406. data/docs/Tasker/Telemetry/MetricTypes/Histogram.html +1492 -0
  407. data/docs/Tasker/Telemetry/MetricTypes.html +153 -0
  408. data/docs/Tasker/Telemetry/MetricsBackend.html +2510 -0
  409. data/docs/Tasker/Telemetry/MetricsExportService.html +578 -0
  410. data/docs/Tasker/Telemetry/PluginRegistry.html +1774 -0
  411. data/docs/Tasker/Telemetry/Plugins/BaseExporter.html +1835 -0
  412. data/docs/Tasker/Telemetry/Plugins/CsvExporter.html +768 -0
  413. data/docs/Tasker/Telemetry/Plugins/JsonExporter.html +747 -0
  414. data/docs/Tasker/Telemetry/Plugins.html +117 -0
  415. data/docs/Tasker/Telemetry/PrometheusExporter.html +481 -0
  416. data/docs/Tasker/Telemetry/TraceBackend.html +891 -0
  417. data/docs/Tasker/Telemetry.html +130 -0
  418. data/docs/Tasker/Types/AuthConfig.html +886 -0
  419. data/docs/Tasker/Types/BackoffConfig.html +1063 -0
  420. data/docs/Tasker/Types/BaseConfig.html +227 -0
  421. data/docs/Tasker/Types/CacheConfig.html +1731 -0
  422. data/docs/Tasker/Types/DatabaseConfig.html +388 -0
  423. data/docs/Tasker/Types/DependencyGraph.html +526 -0
  424. data/docs/Tasker/Types/DependencyGraphConfig.html +753 -0
  425. data/docs/Tasker/Types/EngineConfig.html +1181 -0
  426. data/docs/Tasker/Types/ExecutionConfig.html +1963 -0
  427. data/docs/Tasker/Types/GraphEdge.html +517 -0
  428. data/docs/Tasker/Types/GraphMetadata.html +781 -0
  429. data/docs/Tasker/Types/GraphNode.html +694 -0
  430. data/docs/Tasker/Types/HealthConfig.html +784 -0
  431. data/docs/Tasker/Types/StepSequence.html +353 -0
  432. data/docs/Tasker/Types/StepTemplate.html +1193 -0
  433. data/docs/Tasker/Types/TaskRequest.html +1179 -0
  434. data/docs/Tasker/Types/TelemetryConfig.html +2746 -0
  435. data/docs/Tasker/Types.html +154 -0
  436. data/docs/Tasker/WorkflowStep/StepFinder.html +282 -0
  437. data/docs/Tasker/WorkflowStep.html +2724 -0
  438. data/docs/Tasker/WorkflowStepEdge.html +304 -0
  439. data/docs/Tasker/WorkflowStepSerializer.html +305 -0
  440. data/docs/Tasker/WorkflowStepTransition/TransitionDescriptionFormatter.html +282 -0
  441. data/docs/Tasker/WorkflowStepTransition.html +2201 -0
  442. data/docs/Tasker/WorkflowStepsController.html +462 -0
  443. data/docs/Tasker.html +452 -0
  444. data/docs/VISION.md +584 -0
  445. data/docs/WHY.md +21 -0
  446. data/docs/_index.html +2375 -0
  447. data/docs/class_list.html +54 -0
  448. data/docs/css/common.css +1 -0
  449. data/docs/css/full_list.css +58 -0
  450. data/docs/css/style.css +503 -0
  451. data/docs/events/migration_plan_outcomes.md +80 -0
  452. data/docs/file.README.html +541 -0
  453. data/docs/file_list.html +59 -0
  454. data/docs/frames.html +22 -0
  455. data/docs/index.html +541 -0
  456. data/docs/js/app.js +344 -0
  457. data/docs/js/full_list.js +242 -0
  458. data/docs/js/jquery.js +4 -0
  459. data/docs/method_list.html +9182 -0
  460. data/docs/top-level-namespace.html +110 -0
  461. data/lib/generators/tasker/authenticator_generator.rb +301 -0
  462. data/lib/generators/tasker/authorization_coordinator_generator.rb +139 -0
  463. data/lib/generators/tasker/events_generator.rb +91 -0
  464. data/lib/generators/tasker/subscriber_generator.rb +107 -0
  465. data/lib/generators/tasker/task_handler_generator.rb +138 -0
  466. data/lib/generators/tasker/templates/api_token_authenticator.rb.erb +113 -0
  467. data/lib/generators/tasker/templates/api_token_authenticator_spec.rb.erb +144 -0
  468. data/lib/generators/tasker/templates/authorization_coordinator.rb.erb +95 -0
  469. data/lib/generators/tasker/templates/authorization_coordinator_spec.rb.erb +142 -0
  470. data/lib/generators/tasker/templates/custom_authenticator.rb.erb +108 -0
  471. data/lib/generators/tasker/templates/custom_authenticator_spec.rb.erb +162 -0
  472. data/lib/generators/tasker/templates/custom_events.yml.erb +62 -0
  473. data/lib/generators/tasker/templates/custom_subscriber.rb.erb +72 -0
  474. data/lib/generators/tasker/templates/devise_authenticator.rb.erb +101 -0
  475. data/lib/generators/tasker/templates/devise_authenticator_spec.rb.erb +126 -0
  476. data/lib/generators/tasker/templates/initialize.rb.erb +202 -0
  477. data/lib/generators/tasker/templates/jwt_authenticator.rb.erb +144 -0
  478. data/lib/generators/tasker/templates/jwt_authenticator_spec.rb.erb +298 -0
  479. data/lib/generators/tasker/templates/metrics_subscriber.rb.erb +258 -0
  480. data/lib/generators/tasker/templates/metrics_subscriber_spec.rb.erb +308 -0
  481. data/lib/generators/tasker/templates/omniauth_authenticator.rb.erb +135 -0
  482. data/lib/generators/tasker/templates/omniauth_authenticator_spec.rb.erb +196 -0
  483. data/lib/generators/tasker/templates/opentelemetry_initializer.rb +52 -0
  484. data/lib/generators/tasker/templates/subscriber.rb.erb +64 -0
  485. data/lib/generators/tasker/templates/subscriber_spec.rb.erb +80 -0
  486. data/lib/generators/tasker/templates/task_config.yaml.erb +117 -0
  487. data/lib/generators/tasker/templates/task_handler.rb.erb +59 -0
  488. data/lib/generators/tasker/templates/task_handler_spec.rb.erb +159 -0
  489. data/lib/tasker/analysis/runtime_graph_analyzer.rb +1168 -0
  490. data/lib/tasker/analysis/template_graph_analyzer.rb +328 -0
  491. data/lib/tasker/authentication/coordinator.rb +78 -0
  492. data/lib/tasker/authentication/errors.rb +9 -0
  493. data/lib/tasker/authentication/interface.rb +36 -0
  494. data/lib/tasker/authentication/none_authenticator.rb +26 -0
  495. data/lib/tasker/authorization/base_coordinator.rb +112 -0
  496. data/lib/tasker/authorization/errors.rb +26 -0
  497. data/lib/tasker/authorization/resource_constants.rb +74 -0
  498. data/lib/tasker/authorization/resource_registry.rb +143 -0
  499. data/lib/tasker/authorization.rb +75 -0
  500. data/lib/tasker/cache_capabilities.rb +131 -0
  501. data/lib/tasker/cache_strategy.rb +469 -0
  502. data/lib/tasker/concerns/authenticatable.rb +41 -0
  503. data/lib/tasker/concerns/authorizable.rb +204 -0
  504. data/lib/tasker/concerns/controller_authorizable.rb +124 -0
  505. data/lib/tasker/concerns/event_publisher.rb +716 -0
  506. data/lib/tasker/concerns/idempotent_state_transitions.rb +128 -0
  507. data/lib/tasker/concerns/state_machine_base.rb +218 -0
  508. data/lib/tasker/concerns/structured_logging.rb +387 -0
  509. data/lib/tasker/configuration.rb +325 -0
  510. data/lib/tasker/constants/event_definitions.rb +147 -0
  511. data/lib/tasker/constants/registry_events.rb +54 -0
  512. data/lib/tasker/constants.rb +417 -0
  513. data/lib/tasker/engine.rb +90 -0
  514. data/lib/tasker/errors.rb +90 -0
  515. data/lib/tasker/events/catalog.rb +432 -0
  516. data/lib/tasker/events/custom_registry.rb +175 -0
  517. data/lib/tasker/events/definition_loader.rb +199 -0
  518. data/lib/tasker/events/event_payload_builder.rb +461 -0
  519. data/lib/tasker/events/publisher.rb +149 -0
  520. data/lib/tasker/events/subscribers/base_subscriber.rb +601 -0
  521. data/lib/tasker/events/subscribers/metrics_subscriber.rb +120 -0
  522. data/lib/tasker/events/subscribers/telemetry_subscriber.rb +462 -0
  523. data/lib/tasker/events/subscription_loader.rb +161 -0
  524. data/lib/tasker/events.rb +37 -0
  525. data/lib/tasker/functions/function_based_analytics_metrics.rb +103 -0
  526. data/lib/tasker/functions/function_based_dependency_levels.rb +54 -0
  527. data/lib/tasker/functions/function_based_slowest_steps.rb +84 -0
  528. data/lib/tasker/functions/function_based_slowest_tasks.rb +84 -0
  529. data/lib/tasker/functions/function_based_step_readiness_status.rb +183 -0
  530. data/lib/tasker/functions/function_based_system_health_counts.rb +94 -0
  531. data/lib/tasker/functions/function_based_task_execution_context.rb +148 -0
  532. data/lib/tasker/functions/function_wrapper.rb +42 -0
  533. data/lib/tasker/functions.rb +12 -0
  534. data/lib/tasker/handler_factory.rb +322 -0
  535. data/lib/tasker/health/readiness_checker.rb +186 -0
  536. data/lib/tasker/health/status_checker.rb +203 -0
  537. data/lib/tasker/identity_strategy.rb +38 -0
  538. data/lib/tasker/logging/correlation_id_generator.rb +120 -0
  539. data/lib/tasker/orchestration/backoff_calculator.rb +184 -0
  540. data/lib/tasker/orchestration/connection_builder.rb +122 -0
  541. data/lib/tasker/orchestration/connection_pool_intelligence.rb +177 -0
  542. data/lib/tasker/orchestration/coordinator.rb +119 -0
  543. data/lib/tasker/orchestration/future_state_analyzer.rb +137 -0
  544. data/lib/tasker/orchestration/plugin_integration.rb +124 -0
  545. data/lib/tasker/orchestration/response_processor.rb +168 -0
  546. data/lib/tasker/orchestration/retry_header_parser.rb +78 -0
  547. data/lib/tasker/orchestration/step_executor.rb +941 -0
  548. data/lib/tasker/orchestration/step_sequence_factory.rb +67 -0
  549. data/lib/tasker/orchestration/task_finalizer.rb +564 -0
  550. data/lib/tasker/orchestration/task_initializer.rb +140 -0
  551. data/lib/tasker/orchestration/task_reenqueuer.rb +71 -0
  552. data/lib/tasker/orchestration/viable_step_discovery.rb +65 -0
  553. data/lib/tasker/orchestration/workflow_coordinator.rb +294 -0
  554. data/lib/tasker/orchestration.rb +45 -0
  555. data/lib/tasker/railtie.rb +9 -0
  556. data/lib/tasker/registry/base_registry.rb +177 -0
  557. data/lib/tasker/registry/event_publisher.rb +91 -0
  558. data/lib/tasker/registry/interface_validator.rb +140 -0
  559. data/lib/tasker/registry/statistics_collector.rb +381 -0
  560. data/lib/tasker/registry/subscriber_registry.rb +285 -0
  561. data/lib/tasker/registry.rb +22 -0
  562. data/lib/tasker/state_machine/step_state_machine.rb +508 -0
  563. data/lib/tasker/state_machine/task_state_machine.rb +192 -0
  564. data/lib/tasker/state_machine.rb +83 -0
  565. data/lib/tasker/step_handler/api.rb +410 -0
  566. data/lib/tasker/step_handler/base.rb +206 -0
  567. data/lib/tasker/task_builder.rb +432 -0
  568. data/lib/tasker/task_handler/class_methods.rb +324 -0
  569. data/lib/tasker/task_handler/instance_methods.rb +293 -0
  570. data/lib/tasker/task_handler/step_group.rb +182 -0
  571. data/lib/tasker/task_handler.rb +43 -0
  572. data/lib/tasker/telemetry/event_mapping.rb +126 -0
  573. data/lib/tasker/telemetry/event_router.rb +318 -0
  574. data/lib/tasker/telemetry/events/export_events.rb +38 -0
  575. data/lib/tasker/telemetry/export_coordinator.rb +497 -0
  576. data/lib/tasker/telemetry/intelligent_cache_manager.rb +508 -0
  577. data/lib/tasker/telemetry/log_backend.rb +224 -0
  578. data/lib/tasker/telemetry/metric_types.rb +368 -0
  579. data/lib/tasker/telemetry/metrics_backend.rb +1227 -0
  580. data/lib/tasker/telemetry/metrics_export_service.rb +392 -0
  581. data/lib/tasker/telemetry/plugin_registry.rb +333 -0
  582. data/lib/tasker/telemetry/plugins/base_exporter.rb +246 -0
  583. data/lib/tasker/telemetry/plugins/csv_exporter.rb +198 -0
  584. data/lib/tasker/telemetry/plugins/json_exporter.rb +141 -0
  585. data/lib/tasker/telemetry/prometheus_exporter.rb +249 -0
  586. data/lib/tasker/telemetry/trace_backend.rb +186 -0
  587. data/lib/tasker/telemetry.rb +59 -0
  588. data/lib/tasker/types/auth_config.rb +81 -0
  589. data/lib/tasker/types/backoff_config.rb +142 -0
  590. data/lib/tasker/types/cache_config.rb +257 -0
  591. data/lib/tasker/types/database_config.rb +39 -0
  592. data/lib/tasker/types/dependency_graph.rb +225 -0
  593. data/lib/tasker/types/dependency_graph_config.rb +149 -0
  594. data/lib/tasker/types/engine_config.rb +131 -0
  595. data/lib/tasker/types/execution_config.rb +289 -0
  596. data/lib/tasker/types/health_config.rb +84 -0
  597. data/lib/tasker/types/step_sequence.rb +24 -0
  598. data/lib/tasker/types/step_template.rb +63 -0
  599. data/lib/tasker/types/task_request.rb +60 -0
  600. data/lib/tasker/types/telemetry_config.rb +273 -0
  601. data/lib/tasker/types.rb +64 -0
  602. data/lib/tasker/version.rb +7 -0
  603. data/lib/tasker.rb +82 -0
  604. data/lib/tasks/tasker_tasks.rake +302 -0
  605. metadata +958 -0
@@ -0,0 +1,2201 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Tasker::WorkflowStepTransition
8
+
9
+ &mdash; Documentation by YARD 0.9.37
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Tasker::WorkflowStepTransition";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (W)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Tasker.html" title="Tasker (module)">Tasker</a></span></span>
41
+ &raquo;
42
+ <span class="title">WorkflowStepTransition</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Tasker::WorkflowStepTransition
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="ApplicationRecord.html" title="Tasker::ApplicationRecord (class)">ApplicationRecord</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">ActiveRecord::Base</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="ApplicationRecord.html" title="Tasker::ApplicationRecord (class)">ApplicationRecord</a></span></li>
80
+
81
+ <li class="next">Tasker::WorkflowStepTransition</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>app/models/tasker/workflow_step_transition.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+
109
+ <p>WorkflowStepTransition represents state transitions for WorkflowStep entities using Statesman</p>
110
+
111
+ <p>This model stores the audit trail of all workflow step state changes, providing a complete history of step lifecycle events with metadata and timestamps.</p>
112
+
113
+
114
+ </div>
115
+ </div>
116
+ <div class="tags">
117
+
118
+
119
+ </div><h2>Defined Under Namespace</h2>
120
+ <p class="children">
121
+
122
+
123
+
124
+
125
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="WorkflowStepTransition/TransitionDescriptionFormatter.html" title="Tasker::WorkflowStepTransition::TransitionDescriptionFormatter (class)">TransitionDescriptionFormatter</a></span>
126
+
127
+
128
+ </p>
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+ <h2>
138
+ Class Method Summary
139
+ <small><a href="#" class="summary_toggle">collapse</a></small>
140
+ </h2>
141
+
142
+ <ul class="summary">
143
+
144
+ <li class="public ">
145
+ <span class="summary_signature">
146
+
147
+ <a href="#for_attempt-class_method" title="for_attempt (class method)">.<strong>for_attempt</strong>(attempt) &#x21d2; ActiveRecord::Relation </a>
148
+
149
+
150
+
151
+ </span>
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+ <span class="summary_desc"><div class='inline'>
162
+ <p>Find transitions by attempt number.</p>
163
+ </div></span>
164
+
165
+ </li>
166
+
167
+
168
+ <li class="public ">
169
+ <span class="summary_signature">
170
+
171
+ <a href="#in_time_range-class_method" title="in_time_range (class method)">.<strong>in_time_range</strong>(start_time, end_time) &#x21d2; ActiveRecord::Relation </a>
172
+
173
+
174
+
175
+ </span>
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+ <span class="summary_desc"><div class='inline'>
186
+ <p>Find all transitions that occurred within a time range.</p>
187
+ </div></span>
188
+
189
+ </li>
190
+
191
+
192
+ <li class="public ">
193
+ <span class="summary_signature">
194
+
195
+ <a href="#most_recent_to_state-class_method" title="most_recent_to_state (class method)">.<strong>most_recent_to_state</strong>(state) &#x21d2; WorkflowStepTransition<sup>?</sup> </a>
196
+
197
+
198
+
199
+ </span>
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+ <span class="summary_desc"><div class='inline'>
210
+ <p>Find the most recent transition to a specific state.</p>
211
+ </div></span>
212
+
213
+ </li>
214
+
215
+
216
+ <li class="public ">
217
+ <span class="summary_signature">
218
+
219
+ <a href="#retry_transitions-class_method" title="retry_transitions (class method)">.<strong>retry_transitions</strong> &#x21d2; ActiveRecord::Relation </a>
220
+
221
+
222
+
223
+ </span>
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+ <span class="summary_desc"><div class='inline'>
234
+ <p>Find retry transitions.</p>
235
+ </div></span>
236
+
237
+ </li>
238
+
239
+
240
+ <li class="public ">
241
+ <span class="summary_signature">
242
+
243
+ <a href="#statistics-class_method" title="statistics (class method)">.<strong>statistics</strong> &#x21d2; Hash </a>
244
+
245
+
246
+
247
+ </span>
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+ <span class="summary_desc"><div class='inline'>
258
+ <p>Get transition statistics for analytics.</p>
259
+ </div></span>
260
+
261
+ </li>
262
+
263
+
264
+ <li class="public ">
265
+ <span class="summary_signature">
266
+
267
+ <a href="#with_metadata_value-class_method" title="with_metadata_value (class method)">.<strong>with_metadata_value</strong>(key, value) &#x21d2; ActiveRecord::Relation </a>
268
+
269
+
270
+
271
+ </span>
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+ <span class="summary_desc"><div class='inline'>
282
+ <p>Find transitions with specific metadata values.</p>
283
+ </div></span>
284
+
285
+ </li>
286
+
287
+
288
+ </ul>
289
+
290
+ <h2>
291
+ Instance Method Summary
292
+ <small><a href="#" class="summary_toggle">collapse</a></small>
293
+ </h2>
294
+
295
+ <ul class="summary">
296
+
297
+ <li class="public ">
298
+ <span class="summary_signature">
299
+
300
+ <a href="#attempt_number-instance_method" title="#attempt_number (instance method)">#<strong>attempt_number</strong> &#x21d2; Integer </a>
301
+
302
+
303
+
304
+ </span>
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+ <span class="summary_desc"><div class='inline'>
315
+ <p>Get the attempt number for this transition.</p>
316
+ </div></span>
317
+
318
+ </li>
319
+
320
+
321
+ <li class="public ">
322
+ <span class="summary_signature">
323
+
324
+ <a href="#backoff_info-instance_method" title="#backoff_info (instance method)">#<strong>backoff_info</strong> &#x21d2; Hash<sup>?</sup> </a>
325
+
326
+
327
+
328
+ </span>
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+ <span class="summary_desc"><div class='inline'>
339
+ <p>Get backoff information if this is an error transition.</p>
340
+ </div></span>
341
+
342
+ </li>
343
+
344
+
345
+ <li class="public ">
346
+ <span class="summary_signature">
347
+
348
+ <a href="#cancellation_transition%3F-instance_method" title="#cancellation_transition? (instance method)">#<strong>cancellation_transition?</strong> &#x21d2; Boolean </a>
349
+
350
+
351
+
352
+ </span>
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+ <span class="summary_desc"><div class='inline'>
363
+ <p>Check if this transition represents cancellation.</p>
364
+ </div></span>
365
+
366
+ </li>
367
+
368
+
369
+ <li class="public ">
370
+ <span class="summary_signature">
371
+
372
+ <a href="#completion_transition%3F-instance_method" title="#completion_transition? (instance method)">#<strong>completion_transition?</strong> &#x21d2; Boolean </a>
373
+
374
+
375
+
376
+ </span>
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+ <span class="summary_desc"><div class='inline'>
387
+ <p>Check if this transition represents completion.</p>
388
+ </div></span>
389
+
390
+ </li>
391
+
392
+
393
+ <li class="public ">
394
+ <span class="summary_signature">
395
+
396
+ <a href="#description-instance_method" title="#description (instance method)">#<strong>description</strong> &#x21d2; String </a>
397
+
398
+
399
+
400
+ </span>
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+ <span class="summary_desc"><div class='inline'>
411
+ <p>Get human-readable description of the transition.</p>
412
+ </div></span>
413
+
414
+ </li>
415
+
416
+
417
+ <li class="public ">
418
+ <span class="summary_signature">
419
+
420
+ <a href="#duration_since_previous-instance_method" title="#duration_since_previous (instance method)">#<strong>duration_since_previous</strong> &#x21d2; Float<sup>?</sup> </a>
421
+
422
+
423
+
424
+ </span>
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+ <span class="summary_desc"><div class='inline'>
435
+ <p>Get the duration since the previous transition.</p>
436
+ </div></span>
437
+
438
+ </li>
439
+
440
+
441
+ <li class="public ">
442
+ <span class="summary_signature">
443
+
444
+ <a href="#error_transition%3F-instance_method" title="#error_transition? (instance method)">#<strong>error_transition?</strong> &#x21d2; Boolean </a>
445
+
446
+
447
+
448
+ </span>
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+ <span class="summary_desc"><div class='inline'>
459
+ <p>Check if this transition represents an error state.</p>
460
+ </div></span>
461
+
462
+ </li>
463
+
464
+
465
+ <li class="public ">
466
+ <span class="summary_signature">
467
+
468
+ <a href="#execution_duration-instance_method" title="#execution_duration (instance method)">#<strong>execution_duration</strong> &#x21d2; Float<sup>?</sup> </a>
469
+
470
+
471
+
472
+ </span>
473
+
474
+
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+ <span class="summary_desc"><div class='inline'>
483
+ <p>Get the execution duration if available.</p>
484
+ </div></span>
485
+
486
+ </li>
487
+
488
+
489
+ <li class="public ">
490
+ <span class="summary_signature">
491
+
492
+ <a href="#formatted_metadata-instance_method" title="#formatted_metadata (instance method)">#<strong>formatted_metadata</strong> &#x21d2; Hash </a>
493
+
494
+
495
+
496
+ </span>
497
+
498
+
499
+
500
+
501
+
502
+
503
+
504
+
505
+
506
+ <span class="summary_desc"><div class='inline'>
507
+ <p>Get formatted metadata for display.</p>
508
+ </div></span>
509
+
510
+ </li>
511
+
512
+
513
+ <li class="public ">
514
+ <span class="summary_signature">
515
+
516
+ <a href="#get_metadata-instance_method" title="#get_metadata (instance method)">#<strong>get_metadata</strong>(key, default = nil) &#x21d2; Object </a>
517
+
518
+
519
+
520
+ </span>
521
+
522
+
523
+
524
+
525
+
526
+
527
+
528
+
529
+
530
+ <span class="summary_desc"><div class='inline'>
531
+ <p>Get metadata value with default.</p>
532
+ </div></span>
533
+
534
+ </li>
535
+
536
+
537
+ <li class="public ">
538
+ <span class="summary_signature">
539
+
540
+ <a href="#has_metadata%3F-instance_method" title="#has_metadata? (instance method)">#<strong>has_metadata?</strong>(key) &#x21d2; Boolean </a>
541
+
542
+
543
+
544
+ </span>
545
+
546
+
547
+
548
+
549
+
550
+
551
+
552
+
553
+
554
+ <span class="summary_desc"><div class='inline'>
555
+ <p>Check if transition has specific metadata.</p>
556
+ </div></span>
557
+
558
+ </li>
559
+
560
+
561
+ <li class="public ">
562
+ <span class="summary_signature">
563
+
564
+ <a href="#retry_transition%3F-instance_method" title="#retry_transition? (instance method)">#<strong>retry_transition?</strong> &#x21d2; Boolean </a>
565
+
566
+
567
+
568
+ </span>
569
+
570
+
571
+
572
+
573
+
574
+
575
+
576
+
577
+
578
+ <span class="summary_desc"><div class='inline'>
579
+ <p>Check if this transition represents a retry attempt.</p>
580
+ </div></span>
581
+
582
+ </li>
583
+
584
+
585
+ <li class="public ">
586
+ <span class="summary_signature">
587
+
588
+ <a href="#set_metadata-instance_method" title="#set_metadata (instance method)">#<strong>set_metadata</strong>(key, value) &#x21d2; Object </a>
589
+
590
+
591
+
592
+ </span>
593
+
594
+
595
+
596
+
597
+
598
+
599
+
600
+
601
+
602
+ <span class="summary_desc"><div class='inline'>
603
+ <p>Set metadata value.</p>
604
+ </div></span>
605
+
606
+ </li>
607
+
608
+
609
+ <li class="public ">
610
+ <span class="summary_signature">
611
+
612
+ <a href="#step_name-instance_method" title="#step_name (instance method)">#<strong>step_name</strong> &#x21d2; String </a>
613
+
614
+
615
+
616
+ </span>
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+ <span class="summary_desc"><div class='inline'>
627
+ <p>Get the step name through the workflow step.</p>
628
+ </div></span>
629
+
630
+ </li>
631
+
632
+
633
+ <li class="public ">
634
+ <span class="summary_signature">
635
+
636
+ <a href="#task-instance_method" title="#task (instance method)">#<strong>task</strong> &#x21d2; Task </a>
637
+
638
+
639
+
640
+ </span>
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+ <span class="summary_desc"><div class='inline'>
651
+ <p>Get the associated task through the workflow step.</p>
652
+ </div></span>
653
+
654
+ </li>
655
+
656
+
657
+ </ul>
658
+
659
+
660
+
661
+
662
+
663
+
664
+
665
+
666
+
667
+
668
+
669
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="ApplicationRecord.html" title="Tasker::ApplicationRecord (class)">ApplicationRecord</a></span></h3>
670
+ <p class="inherited"><span class='object_link'><a href="ApplicationRecord.html#configure_database_connections-class_method" title="Tasker::ApplicationRecord.configure_database_connections (method)">configure_database_connections</a></span>, <span class='object_link'><a href="ApplicationRecord.html#database_configuration_exists%3F-class_method" title="Tasker::ApplicationRecord.database_configuration_exists? (method)">database_configuration_exists?</a></span></p>
671
+
672
+
673
+
674
+ <div id="class_method_details" class="method_details_list">
675
+ <h2>Class Method Details</h2>
676
+
677
+
678
+ <div class="method_details first">
679
+ <h3 class="signature first" id="for_attempt-class_method">
680
+
681
+ .<strong>for_attempt</strong>(attempt) &#x21d2; <tt>ActiveRecord::Relation</tt>
682
+
683
+
684
+
685
+
686
+
687
+ </h3><div class="docstring">
688
+ <div class="discussion">
689
+
690
+ <p>Find transitions by attempt number</p>
691
+
692
+
693
+ </div>
694
+ </div>
695
+ <div class="tags">
696
+ <p class="tag_title">Parameters:</p>
697
+ <ul class="param">
698
+
699
+ <li>
700
+
701
+ <span class='name'>attempt</span>
702
+
703
+
704
+ <span class='type'>(<tt>Integer</tt>)</span>
705
+
706
+
707
+
708
+ &mdash;
709
+ <div class='inline'>
710
+ <p>The attempt number to filter by</p>
711
+ </div>
712
+
713
+ </li>
714
+
715
+ </ul>
716
+
717
+ <p class="tag_title">Returns:</p>
718
+ <ul class="return">
719
+
720
+ <li>
721
+
722
+
723
+ <span class='type'>(<tt>ActiveRecord::Relation</tt>)</span>
724
+
725
+
726
+
727
+ &mdash;
728
+ <div class='inline'>
729
+ <p>Transitions for the given attempt</p>
730
+ </div>
731
+
732
+ </li>
733
+
734
+ </ul>
735
+
736
+ </div><table class="source_code">
737
+ <tr>
738
+ <td>
739
+ <pre class="lines">
740
+
741
+
742
+ 93
743
+ 94
744
+ 95</pre>
745
+ </td>
746
+ <td>
747
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 93</span>
748
+
749
+ <span class='kw'>def</span> <span class='id identifier rubyid_for_attempt'>for_attempt</span><span class='lparen'>(</span><span class='id identifier rubyid_attempt'>attempt</span><span class='rparen'>)</span>
750
+ <span class='id identifier rubyid_with_metadata_value'>with_metadata_value</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>attempt_number</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_attempt'>attempt</span><span class='rparen'>)</span>
751
+ <span class='kw'>end</span></pre>
752
+ </td>
753
+ </tr>
754
+ </table>
755
+ </div>
756
+
757
+ <div class="method_details ">
758
+ <h3 class="signature " id="in_time_range-class_method">
759
+
760
+ .<strong>in_time_range</strong>(start_time, end_time) &#x21d2; <tt>ActiveRecord::Relation</tt>
761
+
762
+
763
+
764
+
765
+
766
+ </h3><div class="docstring">
767
+ <div class="discussion">
768
+
769
+ <p>Find all transitions that occurred within a time range</p>
770
+
771
+
772
+ </div>
773
+ </div>
774
+ <div class="tags">
775
+ <p class="tag_title">Parameters:</p>
776
+ <ul class="param">
777
+
778
+ <li>
779
+
780
+ <span class='name'>start_time</span>
781
+
782
+
783
+ <span class='type'>(<tt>Time</tt>)</span>
784
+
785
+
786
+
787
+ &mdash;
788
+ <div class='inline'>
789
+ <p>The start of the time range</p>
790
+ </div>
791
+
792
+ </li>
793
+
794
+ <li>
795
+
796
+ <span class='name'>end_time</span>
797
+
798
+
799
+ <span class='type'>(<tt>Time</tt>)</span>
800
+
801
+
802
+
803
+ &mdash;
804
+ <div class='inline'>
805
+ <p>The end of the time range</p>
806
+ </div>
807
+
808
+ </li>
809
+
810
+ </ul>
811
+
812
+ <p class="tag_title">Returns:</p>
813
+ <ul class="return">
814
+
815
+ <li>
816
+
817
+
818
+ <span class='type'>(<tt>ActiveRecord::Relation</tt>)</span>
819
+
820
+
821
+
822
+ &mdash;
823
+ <div class='inline'>
824
+ <p>Transitions within the time range</p>
825
+ </div>
826
+
827
+ </li>
828
+
829
+ </ul>
830
+
831
+ </div><table class="source_code">
832
+ <tr>
833
+ <td>
834
+ <pre class="lines">
835
+
836
+
837
+ 67
838
+ 68
839
+ 69</pre>
840
+ </td>
841
+ <td>
842
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 67</span>
843
+
844
+ <span class='kw'>def</span> <span class='id identifier rubyid_in_time_range'>in_time_range</span><span class='lparen'>(</span><span class='id identifier rubyid_start_time'>start_time</span><span class='comma'>,</span> <span class='id identifier rubyid_end_time'>end_time</span><span class='rparen'>)</span>
845
+ <span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>created_at:</span> <span class='id identifier rubyid_start_time'>start_time</span><span class='op'>..</span><span class='id identifier rubyid_end_time'>end_time</span><span class='rparen'>)</span>
846
+ <span class='kw'>end</span></pre>
847
+ </td>
848
+ </tr>
849
+ </table>
850
+ </div>
851
+
852
+ <div class="method_details ">
853
+ <h3 class="signature " id="most_recent_to_state-class_method">
854
+
855
+ .<strong>most_recent_to_state</strong>(state) &#x21d2; <tt><span class='object_link'><a href="" title="Tasker::WorkflowStepTransition (class)">WorkflowStepTransition</a></span></tt><sup>?</sup>
856
+
857
+
858
+
859
+
860
+
861
+ </h3><div class="docstring">
862
+ <div class="discussion">
863
+
864
+ <p>Find the most recent transition to a specific state</p>
865
+
866
+
867
+ </div>
868
+ </div>
869
+ <div class="tags">
870
+ <p class="tag_title">Parameters:</p>
871
+ <ul class="param">
872
+
873
+ <li>
874
+
875
+ <span class='name'>state</span>
876
+
877
+
878
+ <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
879
+
880
+
881
+
882
+ &mdash;
883
+ <div class='inline'>
884
+ <p>The state to find the most recent transition to</p>
885
+ </div>
886
+
887
+ </li>
888
+
889
+ </ul>
890
+
891
+ <p class="tag_title">Returns:</p>
892
+ <ul class="return">
893
+
894
+ <li>
895
+
896
+
897
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Tasker::WorkflowStepTransition (class)">WorkflowStepTransition</a></span></tt>, <tt>nil</tt>)</span>
898
+
899
+
900
+
901
+ &mdash;
902
+ <div class='inline'>
903
+ <p>The most recent transition to the given state</p>
904
+ </div>
905
+
906
+ </li>
907
+
908
+ </ul>
909
+
910
+ </div><table class="source_code">
911
+ <tr>
912
+ <td>
913
+ <pre class="lines">
914
+
915
+
916
+ 58
917
+ 59
918
+ 60</pre>
919
+ </td>
920
+ <td>
921
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 58</span>
922
+
923
+ <span class='kw'>def</span> <span class='id identifier rubyid_most_recent_to_state'>most_recent_to_state</span><span class='lparen'>(</span><span class='id identifier rubyid_state'>state</span><span class='rparen'>)</span>
924
+ <span class='id identifier rubyid_to_state'>to_state</span><span class='lparen'>(</span><span class='id identifier rubyid_state'>state</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_order'>order</span><span class='lparen'>(</span><span class='label'>sort_key:</span> <span class='symbol'>:desc</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
925
+ <span class='kw'>end</span></pre>
926
+ </td>
927
+ </tr>
928
+ </table>
929
+ </div>
930
+
931
+ <div class="method_details ">
932
+ <h3 class="signature " id="retry_transitions-class_method">
933
+
934
+ .<strong>retry_transitions</strong> &#x21d2; <tt>ActiveRecord::Relation</tt>
935
+
936
+
937
+
938
+
939
+
940
+ </h3><div class="docstring">
941
+ <div class="discussion">
942
+
943
+ <p>Find retry transitions</p>
944
+
945
+
946
+ </div>
947
+ </div>
948
+ <div class="tags">
949
+
950
+ <p class="tag_title">Returns:</p>
951
+ <ul class="return">
952
+
953
+ <li>
954
+
955
+
956
+ <span class='type'>(<tt>ActiveRecord::Relation</tt>)</span>
957
+
958
+
959
+
960
+ &mdash;
961
+ <div class='inline'>
962
+ <p>Transitions from error back to pending (retries)</p>
963
+ </div>
964
+
965
+ </li>
966
+
967
+ </ul>
968
+
969
+ </div><table class="source_code">
970
+ <tr>
971
+ <td>
972
+ <pre class="lines">
973
+
974
+
975
+ 83
976
+ 84
977
+ 85
978
+ 86
979
+ 87</pre>
980
+ </td>
981
+ <td>
982
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 83</span>
983
+
984
+ <span class='kw'>def</span> <span class='id identifier rubyid_retry_transitions'>retry_transitions</span>
985
+ <span class='id identifier rubyid_joins'>joins</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>INNER JOIN </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_table_name'>table_name</span><span class='embexpr_end'>}</span><span class='tstring_content'> prev ON prev.workflow_step_id = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_table_name'>table_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>.workflow_step_id</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
986
+ <span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>to_state:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>pending</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
987
+ <span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>prev.to_state = ? AND prev.sort_key &lt; ?</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>error</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_arel_table'>arel_table</span><span class='lbracket'>[</span><span class='symbol'>:sort_key</span><span class='rbracket'>]</span><span class='rparen'>)</span>
988
+ <span class='kw'>end</span></pre>
989
+ </td>
990
+ </tr>
991
+ </table>
992
+ </div>
993
+
994
+ <div class="method_details ">
995
+ <h3 class="signature " id="statistics-class_method">
996
+
997
+ .<strong>statistics</strong> &#x21d2; <tt>Hash</tt>
998
+
999
+
1000
+
1001
+
1002
+
1003
+ </h3><div class="docstring">
1004
+ <div class="discussion">
1005
+
1006
+ <p>Get transition statistics for analytics</p>
1007
+
1008
+
1009
+ </div>
1010
+ </div>
1011
+ <div class="tags">
1012
+
1013
+ <p class="tag_title">Returns:</p>
1014
+ <ul class="return">
1015
+
1016
+ <li>
1017
+
1018
+
1019
+ <span class='type'>(<tt>Hash</tt>)</span>
1020
+
1021
+
1022
+
1023
+ &mdash;
1024
+ <div class='inline'>
1025
+ <p>Statistics about transitions</p>
1026
+ </div>
1027
+
1028
+ </li>
1029
+
1030
+ </ul>
1031
+
1032
+ </div><table class="source_code">
1033
+ <tr>
1034
+ <td>
1035
+ <pre class="lines">
1036
+
1037
+
1038
+ 100
1039
+ 101
1040
+ 102
1041
+ 103
1042
+ 104
1043
+ 105
1044
+ 106
1045
+ 107
1046
+ 108
1047
+ 109</pre>
1048
+ </td>
1049
+ <td>
1050
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 100</span>
1051
+
1052
+ <span class='kw'>def</span> <span class='id identifier rubyid_statistics'>statistics</span>
1053
+ <span class='lbrace'>{</span>
1054
+ <span class='label'>total_transitions:</span> <span class='id identifier rubyid_count'>count</span><span class='comma'>,</span>
1055
+ <span class='label'>states:</span> <span class='id identifier rubyid_group'>group</span><span class='lparen'>(</span><span class='symbol'>:to_state</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='comma'>,</span>
1056
+ <span class='label'>recent_activity:</span> <span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>created_at:</span> <span class='int'>24</span><span class='period'>.</span><span class='id identifier rubyid_hours'>hours</span><span class='period'>.</span><span class='id identifier rubyid_ago'>ago</span><span class='op'>..</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='comma'>,</span>
1057
+ <span class='label'>retry_attempts:</span> <span class='id identifier rubyid_retry_transitions'>retry_transitions</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='comma'>,</span>
1058
+ <span class='label'>average_execution_time:</span> <span class='id identifier rubyid_average_execution_time'>average_execution_time</span><span class='comma'>,</span>
1059
+ <span class='label'>average_time_between_transitions:</span> <span class='id identifier rubyid_average_time_between_transitions'>average_time_between_transitions</span>
1060
+ <span class='rbrace'>}</span>
1061
+ <span class='kw'>end</span></pre>
1062
+ </td>
1063
+ </tr>
1064
+ </table>
1065
+ </div>
1066
+
1067
+ <div class="method_details ">
1068
+ <h3 class="signature " id="with_metadata_value-class_method">
1069
+
1070
+ .<strong>with_metadata_value</strong>(key, value) &#x21d2; <tt>ActiveRecord::Relation</tt>
1071
+
1072
+
1073
+
1074
+
1075
+
1076
+ </h3><div class="docstring">
1077
+ <div class="discussion">
1078
+
1079
+ <p>Find transitions with specific metadata values</p>
1080
+
1081
+
1082
+ </div>
1083
+ </div>
1084
+ <div class="tags">
1085
+ <p class="tag_title">Parameters:</p>
1086
+ <ul class="param">
1087
+
1088
+ <li>
1089
+
1090
+ <span class='name'>key</span>
1091
+
1092
+
1093
+ <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
1094
+
1095
+
1096
+
1097
+ &mdash;
1098
+ <div class='inline'>
1099
+ <p>The metadata key to search for</p>
1100
+ </div>
1101
+
1102
+ </li>
1103
+
1104
+ <li>
1105
+
1106
+ <span class='name'>value</span>
1107
+
1108
+
1109
+ <span class='type'>(<tt>Object</tt>)</span>
1110
+
1111
+
1112
+
1113
+ &mdash;
1114
+ <div class='inline'>
1115
+ <p>The value to match</p>
1116
+ </div>
1117
+
1118
+ </li>
1119
+
1120
+ </ul>
1121
+
1122
+ <p class="tag_title">Returns:</p>
1123
+ <ul class="return">
1124
+
1125
+ <li>
1126
+
1127
+
1128
+ <span class='type'>(<tt>ActiveRecord::Relation</tt>)</span>
1129
+
1130
+
1131
+
1132
+ &mdash;
1133
+ <div class='inline'>
1134
+ <p>Transitions with matching metadata</p>
1135
+ </div>
1136
+
1137
+ </li>
1138
+
1139
+ </ul>
1140
+
1141
+ </div><table class="source_code">
1142
+ <tr>
1143
+ <td>
1144
+ <pre class="lines">
1145
+
1146
+
1147
+ 76
1148
+ 77
1149
+ 78</pre>
1150
+ </td>
1151
+ <td>
1152
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 76</span>
1153
+
1154
+ <span class='kw'>def</span> <span class='id identifier rubyid_with_metadata_value'>with_metadata_value</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
1155
+ <span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>metadata-&gt;:key = :value</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>key:</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span> <span class='label'>value:</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>&quot;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
1156
+ <span class='kw'>end</span></pre>
1157
+ </td>
1158
+ </tr>
1159
+ </table>
1160
+ </div>
1161
+
1162
+ </div>
1163
+
1164
+ <div id="instance_method_details" class="method_details_list">
1165
+ <h2>Instance Method Details</h2>
1166
+
1167
+
1168
+ <div class="method_details first">
1169
+ <h3 class="signature first" id="attempt_number-instance_method">
1170
+
1171
+ #<strong>attempt_number</strong> &#x21d2; <tt>Integer</tt>
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+ </h3><div class="docstring">
1178
+ <div class="discussion">
1179
+
1180
+ <p>Get the attempt number for this transition</p>
1181
+
1182
+
1183
+ </div>
1184
+ </div>
1185
+ <div class="tags">
1186
+
1187
+ <p class="tag_title">Returns:</p>
1188
+ <ul class="return">
1189
+
1190
+ <li>
1191
+
1192
+
1193
+ <span class='type'>(<tt>Integer</tt>)</span>
1194
+
1195
+
1196
+
1197
+ &mdash;
1198
+ <div class='inline'>
1199
+ <p>The attempt number</p>
1200
+ </div>
1201
+
1202
+ </li>
1203
+
1204
+ </ul>
1205
+
1206
+ </div><table class="source_code">
1207
+ <tr>
1208
+ <td>
1209
+ <pre class="lines">
1210
+
1211
+
1212
+ 199
1213
+ 200
1214
+ 201</pre>
1215
+ </td>
1216
+ <td>
1217
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 199</span>
1218
+
1219
+ <span class='kw'>def</span> <span class='id identifier rubyid_attempt_number'>attempt_number</span>
1220
+ <span class='id identifier rubyid_get_metadata'>get_metadata</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>attempt_number</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='int'>1</span><span class='rparen'>)</span>
1221
+ <span class='kw'>end</span></pre>
1222
+ </td>
1223
+ </tr>
1224
+ </table>
1225
+ </div>
1226
+
1227
+ <div class="method_details ">
1228
+ <h3 class="signature " id="backoff_info-instance_method">
1229
+
1230
+ #<strong>backoff_info</strong> &#x21d2; <tt>Hash</tt><sup>?</sup>
1231
+
1232
+
1233
+
1234
+
1235
+
1236
+ </h3><div class="docstring">
1237
+ <div class="discussion">
1238
+
1239
+ <p>Get backoff information if this is an error transition</p>
1240
+
1241
+
1242
+ </div>
1243
+ </div>
1244
+ <div class="tags">
1245
+
1246
+ <p class="tag_title">Returns:</p>
1247
+ <ul class="return">
1248
+
1249
+ <li>
1250
+
1251
+
1252
+ <span class='type'>(<tt>Hash</tt>, <tt>nil</tt>)</span>
1253
+
1254
+
1255
+
1256
+ &mdash;
1257
+ <div class='inline'>
1258
+ <p>Backoff information or nil if not applicable</p>
1259
+ </div>
1260
+
1261
+ </li>
1262
+
1263
+ </ul>
1264
+
1265
+ </div><table class="source_code">
1266
+ <tr>
1267
+ <td>
1268
+ <pre class="lines">
1269
+
1270
+
1271
+ 263
1272
+ 264
1273
+ 265
1274
+ 266
1275
+ 267
1276
+ 268
1277
+ 269
1278
+ 270
1279
+ 271</pre>
1280
+ </td>
1281
+ <td>
1282
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 263</span>
1283
+
1284
+ <span class='kw'>def</span> <span class='id identifier rubyid_backoff_info'>backoff_info</span>
1285
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_error_transition?'>error_transition?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_has_metadata?'>has_metadata?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>backoff_until</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1286
+
1287
+ <span class='lbrace'>{</span>
1288
+ <span class='label'>backoff_until:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_get_metadata'>get_metadata</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>backoff_until</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='comma'>,</span>
1289
+ <span class='label'>backoff_seconds:</span> <span class='id identifier rubyid_get_metadata'>get_metadata</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>backoff_seconds</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='comma'>,</span>
1290
+ <span class='label'>retry_available:</span> <span class='id identifier rubyid_get_metadata'>get_metadata</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>retry_available</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
1291
+ <span class='rbrace'>}</span>
1292
+ <span class='kw'>end</span></pre>
1293
+ </td>
1294
+ </tr>
1295
+ </table>
1296
+ </div>
1297
+
1298
+ <div class="method_details ">
1299
+ <h3 class="signature " id="cancellation_transition?-instance_method">
1300
+
1301
+ #<strong>cancellation_transition?</strong> &#x21d2; <tt>Boolean</tt>
1302
+
1303
+
1304
+
1305
+
1306
+
1307
+ </h3><div class="docstring">
1308
+ <div class="discussion">
1309
+
1310
+ <p>Check if this transition represents cancellation</p>
1311
+
1312
+
1313
+ </div>
1314
+ </div>
1315
+ <div class="tags">
1316
+
1317
+ <p class="tag_title">Returns:</p>
1318
+ <ul class="return">
1319
+
1320
+ <li>
1321
+
1322
+
1323
+ <span class='type'>(<tt>Boolean</tt>)</span>
1324
+
1325
+
1326
+
1327
+ &mdash;
1328
+ <div class='inline'>
1329
+ <p>True if transitioning to cancelled state</p>
1330
+ </div>
1331
+
1332
+ </li>
1333
+
1334
+ </ul>
1335
+
1336
+ </div><table class="source_code">
1337
+ <tr>
1338
+ <td>
1339
+ <pre class="lines">
1340
+
1341
+
1342
+ 185
1343
+ 186
1344
+ 187</pre>
1345
+ </td>
1346
+ <td>
1347
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 185</span>
1348
+
1349
+ <span class='kw'>def</span> <span class='id identifier rubyid_cancellation_transition?'>cancellation_transition?</span>
1350
+ <span class='id identifier rubyid_to_state'>to_state</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>cancelled</span><span class='tstring_end'>&#39;</span></span>
1351
+ <span class='kw'>end</span></pre>
1352
+ </td>
1353
+ </tr>
1354
+ </table>
1355
+ </div>
1356
+
1357
+ <div class="method_details ">
1358
+ <h3 class="signature " id="completion_transition?-instance_method">
1359
+
1360
+ #<strong>completion_transition?</strong> &#x21d2; <tt>Boolean</tt>
1361
+
1362
+
1363
+
1364
+
1365
+
1366
+ </h3><div class="docstring">
1367
+ <div class="discussion">
1368
+
1369
+ <p>Check if this transition represents completion</p>
1370
+
1371
+
1372
+ </div>
1373
+ </div>
1374
+ <div class="tags">
1375
+
1376
+ <p class="tag_title">Returns:</p>
1377
+ <ul class="return">
1378
+
1379
+ <li>
1380
+
1381
+
1382
+ <span class='type'>(<tt>Boolean</tt>)</span>
1383
+
1384
+
1385
+
1386
+ &mdash;
1387
+ <div class='inline'>
1388
+ <p>True if transitioning to a completion state</p>
1389
+ </div>
1390
+
1391
+ </li>
1392
+
1393
+ </ul>
1394
+
1395
+ </div><table class="source_code">
1396
+ <tr>
1397
+ <td>
1398
+ <pre class="lines">
1399
+
1400
+
1401
+ 178
1402
+ 179
1403
+ 180</pre>
1404
+ </td>
1405
+ <td>
1406
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 178</span>
1407
+
1408
+ <span class='kw'>def</span> <span class='id identifier rubyid_completion_transition?'>completion_transition?</span>
1409
+ <span class='qwords_beg'>%w[</span><span class='tstring_content'>complete</span><span class='words_sep'> </span><span class='tstring_content'>resolved_manually</span><span class='tstring_end'>]</span></span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_to_state'>to_state</span><span class='rparen'>)</span>
1410
+ <span class='kw'>end</span></pre>
1411
+ </td>
1412
+ </tr>
1413
+ </table>
1414
+ </div>
1415
+
1416
+ <div class="method_details ">
1417
+ <h3 class="signature " id="description-instance_method">
1418
+
1419
+ #<strong>description</strong> &#x21d2; <tt>String</tt>
1420
+
1421
+
1422
+
1423
+
1424
+
1425
+ </h3><div class="docstring">
1426
+ <div class="discussion">
1427
+
1428
+ <p>Get human-readable description of the transition</p>
1429
+
1430
+
1431
+ </div>
1432
+ </div>
1433
+ <div class="tags">
1434
+
1435
+ <p class="tag_title">Returns:</p>
1436
+ <ul class="return">
1437
+
1438
+ <li>
1439
+
1440
+
1441
+ <span class='type'>(<tt>String</tt>)</span>
1442
+
1443
+
1444
+
1445
+ &mdash;
1446
+ <div class='inline'>
1447
+ <p>Description of what this transition represents</p>
1448
+ </div>
1449
+
1450
+ </li>
1451
+
1452
+ </ul>
1453
+
1454
+ </div><table class="source_code">
1455
+ <tr>
1456
+ <td>
1457
+ <pre class="lines">
1458
+
1459
+
1460
+ 213
1461
+ 214
1462
+ 215</pre>
1463
+ </td>
1464
+ <td>
1465
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 213</span>
1466
+
1467
+ <span class='kw'>def</span> <span class='id identifier rubyid_description'>description</span>
1468
+ <span class='const'><span class='object_link'><a href="WorkflowStepTransition/TransitionDescriptionFormatter.html" title="Tasker::WorkflowStepTransition::TransitionDescriptionFormatter (class)">TransitionDescriptionFormatter</a></span></span><span class='period'>.</span><span class='id identifier rubyid_format'><span class='object_link'><a href="WorkflowStepTransition/TransitionDescriptionFormatter.html#format-class_method" title="Tasker::WorkflowStepTransition::TransitionDescriptionFormatter.format (method)">format</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
1469
+ <span class='kw'>end</span></pre>
1470
+ </td>
1471
+ </tr>
1472
+ </table>
1473
+ </div>
1474
+
1475
+ <div class="method_details ">
1476
+ <h3 class="signature " id="duration_since_previous-instance_method">
1477
+
1478
+ #<strong>duration_since_previous</strong> &#x21d2; <tt>Float</tt><sup>?</sup>
1479
+
1480
+
1481
+
1482
+
1483
+
1484
+ </h3><div class="docstring">
1485
+ <div class="discussion">
1486
+
1487
+ <p>Get the duration since the previous transition</p>
1488
+
1489
+
1490
+ </div>
1491
+ </div>
1492
+ <div class="tags">
1493
+
1494
+ <p class="tag_title">Returns:</p>
1495
+ <ul class="return">
1496
+
1497
+ <li>
1498
+
1499
+
1500
+ <span class='type'>(<tt>Float</tt>, <tt>nil</tt>)</span>
1501
+
1502
+
1503
+
1504
+ &mdash;
1505
+ <div class='inline'>
1506
+ <p>Duration in seconds since previous transition</p>
1507
+ </div>
1508
+
1509
+ </li>
1510
+
1511
+ </ul>
1512
+
1513
+ </div><table class="source_code">
1514
+ <tr>
1515
+ <td>
1516
+ <pre class="lines">
1517
+
1518
+
1519
+ 157
1520
+ 158
1521
+ 159
1522
+ 160
1523
+ 161
1524
+ 162
1525
+ 163
1526
+ 164
1527
+ 165
1528
+ 166</pre>
1529
+ </td>
1530
+ <td>
1531
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 157</span>
1532
+
1533
+ <span class='kw'>def</span> <span class='id identifier rubyid_duration_since_previous'>duration_since_previous</span>
1534
+ <span class='id identifier rubyid_previous_transition'>previous_transition</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>workflow_step_id:</span> <span class='id identifier rubyid_workflow_step_id'>workflow_step_id</span><span class='rparen'>)</span>
1535
+ <span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>sort_key:</span> <span class='op'>...</span><span class='id identifier rubyid_sort_key'>sort_key</span><span class='rparen'>)</span>
1536
+ <span class='period'>.</span><span class='id identifier rubyid_order'>order</span><span class='lparen'>(</span><span class='label'>sort_key:</span> <span class='symbol'>:desc</span><span class='rparen'>)</span>
1537
+ <span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
1538
+
1539
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_previous_transition'>previous_transition</span>
1540
+
1541
+ <span class='id identifier rubyid_created_at'>created_at</span> <span class='op'>-</span> <span class='id identifier rubyid_previous_transition'>previous_transition</span><span class='period'>.</span><span class='id identifier rubyid_created_at'>created_at</span>
1542
+ <span class='kw'>end</span></pre>
1543
+ </td>
1544
+ </tr>
1545
+ </table>
1546
+ </div>
1547
+
1548
+ <div class="method_details ">
1549
+ <h3 class="signature " id="error_transition?-instance_method">
1550
+
1551
+ #<strong>error_transition?</strong> &#x21d2; <tt>Boolean</tt>
1552
+
1553
+
1554
+
1555
+
1556
+
1557
+ </h3><div class="docstring">
1558
+ <div class="discussion">
1559
+
1560
+ <p>Check if this transition represents an error state</p>
1561
+
1562
+
1563
+ </div>
1564
+ </div>
1565
+ <div class="tags">
1566
+
1567
+ <p class="tag_title">Returns:</p>
1568
+ <ul class="return">
1569
+
1570
+ <li>
1571
+
1572
+
1573
+ <span class='type'>(<tt>Boolean</tt>)</span>
1574
+
1575
+
1576
+
1577
+ &mdash;
1578
+ <div class='inline'>
1579
+ <p>True if transitioning to an error state</p>
1580
+ </div>
1581
+
1582
+ </li>
1583
+
1584
+ </ul>
1585
+
1586
+ </div><table class="source_code">
1587
+ <tr>
1588
+ <td>
1589
+ <pre class="lines">
1590
+
1591
+
1592
+ 171
1593
+ 172
1594
+ 173</pre>
1595
+ </td>
1596
+ <td>
1597
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 171</span>
1598
+
1599
+ <span class='kw'>def</span> <span class='id identifier rubyid_error_transition?'>error_transition?</span>
1600
+ <span class='id identifier rubyid_to_state'>to_state</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>error</span><span class='tstring_end'>&#39;</span></span>
1601
+ <span class='kw'>end</span></pre>
1602
+ </td>
1603
+ </tr>
1604
+ </table>
1605
+ </div>
1606
+
1607
+ <div class="method_details ">
1608
+ <h3 class="signature " id="execution_duration-instance_method">
1609
+
1610
+ #<strong>execution_duration</strong> &#x21d2; <tt>Float</tt><sup>?</sup>
1611
+
1612
+
1613
+
1614
+
1615
+
1616
+ </h3><div class="docstring">
1617
+ <div class="discussion">
1618
+
1619
+ <p>Get the execution duration if available</p>
1620
+
1621
+
1622
+ </div>
1623
+ </div>
1624
+ <div class="tags">
1625
+
1626
+ <p class="tag_title">Returns:</p>
1627
+ <ul class="return">
1628
+
1629
+ <li>
1630
+
1631
+
1632
+ <span class='type'>(<tt>Float</tt>, <tt>nil</tt>)</span>
1633
+
1634
+
1635
+
1636
+ &mdash;
1637
+ <div class='inline'>
1638
+ <p>Execution duration in seconds</p>
1639
+ </div>
1640
+
1641
+ </li>
1642
+
1643
+ </ul>
1644
+
1645
+ </div><table class="source_code">
1646
+ <tr>
1647
+ <td>
1648
+ <pre class="lines">
1649
+
1650
+
1651
+ 206
1652
+ 207
1653
+ 208</pre>
1654
+ </td>
1655
+ <td>
1656
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 206</span>
1657
+
1658
+ <span class='kw'>def</span> <span class='id identifier rubyid_execution_duration'>execution_duration</span>
1659
+ <span class='id identifier rubyid_get_metadata'>get_metadata</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>execution_duration</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1660
+ <span class='kw'>end</span></pre>
1661
+ </td>
1662
+ </tr>
1663
+ </table>
1664
+ </div>
1665
+
1666
+ <div class="method_details ">
1667
+ <h3 class="signature " id="formatted_metadata-instance_method">
1668
+
1669
+ #<strong>formatted_metadata</strong> &#x21d2; <tt>Hash</tt>
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+ </h3><div class="docstring">
1676
+ <div class="discussion">
1677
+
1678
+ <p>Get formatted metadata for display</p>
1679
+
1680
+
1681
+ </div>
1682
+ </div>
1683
+ <div class="tags">
1684
+
1685
+ <p class="tag_title">Returns:</p>
1686
+ <ul class="return">
1687
+
1688
+ <li>
1689
+
1690
+
1691
+ <span class='type'>(<tt>Hash</tt>)</span>
1692
+
1693
+
1694
+
1695
+ &mdash;
1696
+ <div class='inline'>
1697
+ <p>Formatted metadata with additional computed fields</p>
1698
+ </div>
1699
+
1700
+ </li>
1701
+
1702
+ </ul>
1703
+
1704
+ </div><table class="source_code">
1705
+ <tr>
1706
+ <td>
1707
+ <pre class="lines">
1708
+
1709
+
1710
+ 220
1711
+ 221
1712
+ 222
1713
+ 223
1714
+ 224
1715
+ 225
1716
+ 226
1717
+ 227
1718
+ 228
1719
+ 229
1720
+ 230
1721
+ 231</pre>
1722
+ </td>
1723
+ <td>
1724
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 220</span>
1725
+
1726
+ <span class='kw'>def</span> <span class='id identifier rubyid_formatted_metadata'>formatted_metadata</span>
1727
+ <span class='id identifier rubyid_base_metadata'>base_metadata</span> <span class='op'>=</span> <span class='id identifier rubyid_metadata'>metadata</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
1728
+
1729
+ <span class='comment'># Add computed fields
1730
+ </span> <span class='id identifier rubyid_base_metadata'>base_metadata</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>duration_since_previous</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_duration_since_previous'>duration_since_previous</span>
1731
+ <span class='id identifier rubyid_base_metadata'>base_metadata</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>transition_description</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_description'>description</span>
1732
+ <span class='id identifier rubyid_base_metadata'>base_metadata</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>transition_timestamp</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_created_at'>created_at</span><span class='period'>.</span><span class='id identifier rubyid_iso8601'>iso8601</span>
1733
+ <span class='id identifier rubyid_base_metadata'>base_metadata</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>step_name</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_step_name'>step_name</span>
1734
+ <span class='id identifier rubyid_base_metadata'>base_metadata</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>task_id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_workflow_step'>workflow_step</span><span class='period'>.</span><span class='id identifier rubyid_task_id'>task_id</span>
1735
+
1736
+ <span class='id identifier rubyid_base_metadata'>base_metadata</span>
1737
+ <span class='kw'>end</span></pre>
1738
+ </td>
1739
+ </tr>
1740
+ </table>
1741
+ </div>
1742
+
1743
+ <div class="method_details ">
1744
+ <h3 class="signature " id="get_metadata-instance_method">
1745
+
1746
+ #<strong>get_metadata</strong>(key, default = nil) &#x21d2; <tt>Object</tt>
1747
+
1748
+
1749
+
1750
+
1751
+
1752
+ </h3><div class="docstring">
1753
+ <div class="discussion">
1754
+
1755
+ <p>Get metadata value with default</p>
1756
+
1757
+
1758
+ </div>
1759
+ </div>
1760
+ <div class="tags">
1761
+ <p class="tag_title">Parameters:</p>
1762
+ <ul class="param">
1763
+
1764
+ <li>
1765
+
1766
+ <span class='name'>key</span>
1767
+
1768
+
1769
+ <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
1770
+
1771
+
1772
+
1773
+ &mdash;
1774
+ <div class='inline'>
1775
+ <p>The metadata key</p>
1776
+ </div>
1777
+
1778
+ </li>
1779
+
1780
+ <li>
1781
+
1782
+ <span class='name'>default</span>
1783
+
1784
+
1785
+ <span class='type'>(<tt>Object</tt>)</span>
1786
+
1787
+
1788
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1789
+
1790
+
1791
+ &mdash;
1792
+ <div class='inline'>
1793
+ <p>Default value if key not found</p>
1794
+ </div>
1795
+
1796
+ </li>
1797
+
1798
+ </ul>
1799
+
1800
+ <p class="tag_title">Returns:</p>
1801
+ <ul class="return">
1802
+
1803
+ <li>
1804
+
1805
+
1806
+ <span class='type'>(<tt>Object</tt>)</span>
1807
+
1808
+
1809
+
1810
+ &mdash;
1811
+ <div class='inline'>
1812
+ <p>The metadata value or default</p>
1813
+ </div>
1814
+
1815
+ </li>
1816
+
1817
+ </ul>
1818
+
1819
+ </div><table class="source_code">
1820
+ <tr>
1821
+ <td>
1822
+ <pre class="lines">
1823
+
1824
+
1825
+ 246
1826
+ 247
1827
+ 248</pre>
1828
+ </td>
1829
+ <td>
1830
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 246</span>
1831
+
1832
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_metadata'>get_metadata</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1833
+ <span class='id identifier rubyid_metadata'>metadata</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='rparen'>)</span>
1834
+ <span class='kw'>end</span></pre>
1835
+ </td>
1836
+ </tr>
1837
+ </table>
1838
+ </div>
1839
+
1840
+ <div class="method_details ">
1841
+ <h3 class="signature " id="has_metadata?-instance_method">
1842
+
1843
+ #<strong>has_metadata?</strong>(key) &#x21d2; <tt>Boolean</tt>
1844
+
1845
+
1846
+
1847
+
1848
+
1849
+ </h3><div class="docstring">
1850
+ <div class="discussion">
1851
+
1852
+ <p>Check if transition has specific metadata</p>
1853
+
1854
+
1855
+ </div>
1856
+ </div>
1857
+ <div class="tags">
1858
+ <p class="tag_title">Parameters:</p>
1859
+ <ul class="param">
1860
+
1861
+ <li>
1862
+
1863
+ <span class='name'>key</span>
1864
+
1865
+
1866
+ <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
1867
+
1868
+
1869
+
1870
+ &mdash;
1871
+ <div class='inline'>
1872
+ <p>The metadata key to check for</p>
1873
+ </div>
1874
+
1875
+ </li>
1876
+
1877
+ </ul>
1878
+
1879
+ <p class="tag_title">Returns:</p>
1880
+ <ul class="return">
1881
+
1882
+ <li>
1883
+
1884
+
1885
+ <span class='type'>(<tt>Boolean</tt>)</span>
1886
+
1887
+
1888
+
1889
+ &mdash;
1890
+ <div class='inline'>
1891
+ <p>True if the metadata contains the key</p>
1892
+ </div>
1893
+
1894
+ </li>
1895
+
1896
+ </ul>
1897
+
1898
+ </div><table class="source_code">
1899
+ <tr>
1900
+ <td>
1901
+ <pre class="lines">
1902
+
1903
+
1904
+ 237
1905
+ 238
1906
+ 239</pre>
1907
+ </td>
1908
+ <td>
1909
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 237</span>
1910
+
1911
+ <span class='kw'>def</span> <span class='id identifier rubyid_has_metadata?'>has_metadata?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
1912
+ <span class='id identifier rubyid_metadata'>metadata</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
1913
+ <span class='kw'>end</span></pre>
1914
+ </td>
1915
+ </tr>
1916
+ </table>
1917
+ </div>
1918
+
1919
+ <div class="method_details ">
1920
+ <h3 class="signature " id="retry_transition?-instance_method">
1921
+
1922
+ #<strong>retry_transition?</strong> &#x21d2; <tt>Boolean</tt>
1923
+
1924
+
1925
+
1926
+
1927
+
1928
+ </h3><div class="docstring">
1929
+ <div class="discussion">
1930
+
1931
+ <p>Check if this transition represents a retry attempt</p>
1932
+
1933
+
1934
+ </div>
1935
+ </div>
1936
+ <div class="tags">
1937
+
1938
+ <p class="tag_title">Returns:</p>
1939
+ <ul class="return">
1940
+
1941
+ <li>
1942
+
1943
+
1944
+ <span class='type'>(<tt>Boolean</tt>)</span>
1945
+
1946
+
1947
+
1948
+ &mdash;
1949
+ <div class='inline'>
1950
+ <p>True if this is a retry transition</p>
1951
+ </div>
1952
+
1953
+ </li>
1954
+
1955
+ </ul>
1956
+
1957
+ </div><table class="source_code">
1958
+ <tr>
1959
+ <td>
1960
+ <pre class="lines">
1961
+
1962
+
1963
+ 192
1964
+ 193
1965
+ 194</pre>
1966
+ </td>
1967
+ <td>
1968
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 192</span>
1969
+
1970
+ <span class='kw'>def</span> <span class='id identifier rubyid_retry_transition?'>retry_transition?</span>
1971
+ <span class='id identifier rubyid_to_state'>to_state</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>pending</span><span class='tstring_end'>&#39;</span></span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_has_metadata?'>has_metadata?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>retry_attempt</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1972
+ <span class='kw'>end</span></pre>
1973
+ </td>
1974
+ </tr>
1975
+ </table>
1976
+ </div>
1977
+
1978
+ <div class="method_details ">
1979
+ <h3 class="signature " id="set_metadata-instance_method">
1980
+
1981
+ #<strong>set_metadata</strong>(key, value) &#x21d2; <tt>Object</tt>
1982
+
1983
+
1984
+
1985
+
1986
+
1987
+ </h3><div class="docstring">
1988
+ <div class="discussion">
1989
+
1990
+ <p>Set metadata value</p>
1991
+
1992
+
1993
+ </div>
1994
+ </div>
1995
+ <div class="tags">
1996
+ <p class="tag_title">Parameters:</p>
1997
+ <ul class="param">
1998
+
1999
+ <li>
2000
+
2001
+ <span class='name'>key</span>
2002
+
2003
+
2004
+ <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
2005
+
2006
+
2007
+
2008
+ &mdash;
2009
+ <div class='inline'>
2010
+ <p>The metadata key</p>
2011
+ </div>
2012
+
2013
+ </li>
2014
+
2015
+ <li>
2016
+
2017
+ <span class='name'>value</span>
2018
+
2019
+
2020
+ <span class='type'>(<tt>Object</tt>)</span>
2021
+
2022
+
2023
+
2024
+ &mdash;
2025
+ <div class='inline'>
2026
+ <p>The value to set</p>
2027
+ </div>
2028
+
2029
+ </li>
2030
+
2031
+ </ul>
2032
+
2033
+ <p class="tag_title">Returns:</p>
2034
+ <ul class="return">
2035
+
2036
+ <li>
2037
+
2038
+
2039
+ <span class='type'>(<tt>Object</tt>)</span>
2040
+
2041
+
2042
+
2043
+ &mdash;
2044
+ <div class='inline'>
2045
+ <p>The set value</p>
2046
+ </div>
2047
+
2048
+ </li>
2049
+
2050
+ </ul>
2051
+
2052
+ </div><table class="source_code">
2053
+ <tr>
2054
+ <td>
2055
+ <pre class="lines">
2056
+
2057
+
2058
+ 255
2059
+ 256
2060
+ 257
2061
+ 258</pre>
2062
+ </td>
2063
+ <td>
2064
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 255</span>
2065
+
2066
+ <span class='kw'>def</span> <span class='id identifier rubyid_set_metadata'>set_metadata</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
2067
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_metadata'>metadata</span> <span class='op'>=</span> <span class='id identifier rubyid_metadata'>metadata</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
2068
+ <span class='id identifier rubyid_value'>value</span>
2069
+ <span class='kw'>end</span></pre>
2070
+ </td>
2071
+ </tr>
2072
+ </table>
2073
+ </div>
2074
+
2075
+ <div class="method_details ">
2076
+ <h3 class="signature " id="step_name-instance_method">
2077
+
2078
+ #<strong>step_name</strong> &#x21d2; <tt>String</tt>
2079
+
2080
+
2081
+
2082
+
2083
+
2084
+ </h3><div class="docstring">
2085
+ <div class="discussion">
2086
+
2087
+ <p>Get the step name through the workflow step</p>
2088
+
2089
+
2090
+ </div>
2091
+ </div>
2092
+ <div class="tags">
2093
+
2094
+ <p class="tag_title">Returns:</p>
2095
+ <ul class="return">
2096
+
2097
+ <li>
2098
+
2099
+
2100
+ <span class='type'>(<tt>String</tt>)</span>
2101
+
2102
+
2103
+
2104
+ &mdash;
2105
+ <div class='inline'>
2106
+ <p>The name of the workflow step</p>
2107
+ </div>
2108
+
2109
+ </li>
2110
+
2111
+ </ul>
2112
+
2113
+ </div><table class="source_code">
2114
+ <tr>
2115
+ <td>
2116
+ <pre class="lines">
2117
+
2118
+
2119
+ 150
2120
+ 151
2121
+ 152</pre>
2122
+ </td>
2123
+ <td>
2124
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 150</span>
2125
+
2126
+ <span class='kw'>def</span> <span class='id identifier rubyid_step_name'>step_name</span>
2127
+ <span class='id identifier rubyid_workflow_step'>workflow_step</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
2128
+ <span class='kw'>end</span></pre>
2129
+ </td>
2130
+ </tr>
2131
+ </table>
2132
+ </div>
2133
+
2134
+ <div class="method_details ">
2135
+ <h3 class="signature " id="task-instance_method">
2136
+
2137
+ #<strong>task</strong> &#x21d2; <tt><span class='object_link'><a href="Task.html" title="Tasker::Task (class)">Task</a></span></tt>
2138
+
2139
+
2140
+
2141
+
2142
+
2143
+ </h3><div class="docstring">
2144
+ <div class="discussion">
2145
+
2146
+ <p>Get the associated task through the workflow step</p>
2147
+
2148
+
2149
+ </div>
2150
+ </div>
2151
+ <div class="tags">
2152
+
2153
+ <p class="tag_title">Returns:</p>
2154
+ <ul class="return">
2155
+
2156
+ <li>
2157
+
2158
+
2159
+ <span class='type'>(<tt><span class='object_link'><a href="Task.html" title="Tasker::Task (class)">Task</a></span></tt>)</span>
2160
+
2161
+
2162
+
2163
+ &mdash;
2164
+ <div class='inline'>
2165
+ <p>The task that owns this workflow step</p>
2166
+ </div>
2167
+
2168
+ </li>
2169
+
2170
+ </ul>
2171
+
2172
+ </div><table class="source_code">
2173
+ <tr>
2174
+ <td>
2175
+ <pre class="lines">
2176
+
2177
+
2178
+ 145</pre>
2179
+ </td>
2180
+ <td>
2181
+ <pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step_transition.rb', line 145</span>
2182
+
2183
+ <span class='id identifier rubyid_delegate'>delegate</span> <span class='symbol'>:task</span><span class='comma'>,</span> <span class='label'>to:</span> <span class='symbol'>:workflow_step</span></pre>
2184
+ </td>
2185
+ </tr>
2186
+ </table>
2187
+ </div>
2188
+
2189
+ </div>
2190
+
2191
+ </div>
2192
+
2193
+ <div id="footer">
2194
+ Generated on Tue Jul 1 16:47:40 2025 by
2195
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2196
+ 0.9.37 (ruby-3.2.4).
2197
+ </div>
2198
+
2199
+ </div>
2200
+ </body>
2201
+ </html>