Serverless工作流没有案例及视频教程吗?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
我联系下我们的产品,我们是有一个视频教程的。 看起来是没有放到官网上。
我可以给你一个示例,这是我有的时候自己运维云账号下的资源的时候,例如清理MQ实例,今天就随手拉一个流程吃自己的狗粮。
Type: StateMachine
Name: MyFlow-67ca9216-df5a-4b04-abb5-8ebeed99b304
SpecVersion: v1
StartAt: ListInstances
States:
- Type: Parallel
  Name: Parallel
  Branches:
    - StartAt: CheckInstanceTopics
      States:
        - Type: Choice
          Name: CheckInstanceTopics
          Branches:
            - Condition: $Input.topicCount > 0
              Next: ListTopics
          Default: Pass
        - Type: Pass
          Name: Pass
          End: true
        - Type: Task
          Name: ListTopics
          Action: RocketMQ:ListTopics
          TaskMode: RequestComplete
          Parameters:
            instanceId.$: $Input.instanceId
          Next: Map2
        - Type: Map
          Name: Map2
          Processor:
            StartAt: DeleteTopic
            States:
              - Type: Task
                Name: DeleteTopic
                Action: RocketMQ:DeleteTopic
                TaskMode: RequestComplete
                Parameters:
                  instanceId.$: $Input.instanceId
                End: true
          End: true
    - StartAt: CheckIConsumerGroups
      States:
        - Type: Choice
          Name: CheckIConsumerGroups
          Branches:
            - Condition: $Input.groupCount > 0
              Next: ListConsumerGroups
          Default: Pass1
        - Type: Pass
          Name: Pass1
          End: true
        - Type: Task
          Name: ListConsumerGroups
          Action: RocketMQ:ListConsumerGroups
          TaskMode: RequestComplete
          Parameters:
            instanceId.$: $Input.instanceId
          Next: Map1
        - Type: Map
          Name: Map1
          Processor:
            StartAt: DeleteConsumerGroup
            States:
              - Type: Task
                Name: DeleteConsumerGroup
                Action: RocketMQ:DeleteConsumerGroup
                TaskMode: RequestComplete
                Parameters:
                  instanceId.$: $Input.instanceId
                  consumerGroupId.$: $Input.consumerGroupId
                End: true
          End: true
  Next: DeleteInstance
- Type: Task
  Name: DeleteInstance
  Action: RocketMQ:DeleteInstance
  TaskMode: RequestComplete
  End: true
End: true