{
  "name" : "click.kamil.domain.StateMachineConfig",
  "states" : [ {
    "rawName" : "OrderState.NEW",
    "fullIdentifier" : "click.kamil.domain.OrderState.NEW"
  }, {
    "rawName" : "OrderState.CANCELLED",
    "fullIdentifier" : "click.kamil.domain.OrderState.CANCELLED"
  }, {
    "rawName" : "OrderState.PROCESSING",
    "fullIdentifier" : "click.kamil.domain.OrderState.PROCESSING"
  }, {
    "rawName" : "OrderState.COMPLETED",
    "fullIdentifier" : "click.kamil.domain.OrderState.COMPLETED"
  } ],
  "transitions" : [ {
    "type" : "EXTERNAL",
    "sourceStates" : [ {
      "rawName" : "OrderState.NEW",
      "fullIdentifier" : "click.kamil.domain.OrderState.NEW"
    } ],
    "targetStates" : [ {
      "rawName" : "OrderState.PROCESSING",
      "fullIdentifier" : "click.kamil.domain.OrderState.PROCESSING"
    } ],
    "event" : {
      "rawName" : "OrderEvent.PROCESS",
      "fullIdentifier" : "click.kamil.domain.OrderEvent.PROCESS"
    },
    "guards" : [ ],
    "actions" : [ ],
    "order" : null
  }, {
    "type" : "EXTERNAL",
    "sourceStates" : [ {
      "rawName" : "OrderState.PROCESSING",
      "fullIdentifier" : "click.kamil.domain.OrderState.PROCESSING"
    } ],
    "targetStates" : [ {
      "rawName" : "OrderState.COMPLETED",
      "fullIdentifier" : "click.kamil.domain.OrderState.COMPLETED"
    } ],
    "event" : {
      "rawName" : "OrderEvent.COMPLETE",
      "fullIdentifier" : "click.kamil.domain.OrderEvent.COMPLETE"
    },
    "guards" : [ ],
    "actions" : [ ],
    "order" : null
  }, {
    "type" : "EXTERNAL",
    "sourceStates" : [ {
      "rawName" : "OrderState.NEW",
      "fullIdentifier" : "click.kamil.domain.OrderState.NEW"
    } ],
    "targetStates" : [ {
      "rawName" : "OrderState.CANCELLED",
      "fullIdentifier" : "click.kamil.domain.OrderState.CANCELLED"
    } ],
    "event" : {
      "rawName" : "OrderEvent.CANCEL",
      "fullIdentifier" : "click.kamil.domain.OrderEvent.CANCEL"
    },
    "guards" : [ ],
    "actions" : [ ],
    "order" : null
  }, {
    "type" : "EXTERNAL",
    "sourceStates" : [ {
      "rawName" : "OrderState.PROCESSING",
      "fullIdentifier" : "click.kamil.domain.OrderState.PROCESSING"
    } ],
    "targetStates" : [ {
      "rawName" : "OrderState.CANCELLED",
      "fullIdentifier" : "click.kamil.domain.OrderState.CANCELLED"
    } ],
    "event" : {
      "rawName" : "OrderEvent.CANCEL",
      "fullIdentifier" : "click.kamil.domain.OrderEvent.CANCEL"
    },
    "guards" : [ ],
    "actions" : [ ],
    "order" : null
  } ],
  "startStates" : [ "click.kamil.domain.OrderState.NEW" ],
  "endStates" : [ "click.kamil.domain.OrderState.COMPLETED", "click.kamil.domain.OrderState.CANCELLED" ],
  "renderChoicesAsDiamonds" : true,
  "flows" : [ ],
  "stateTypeFqn" : "click.kamil.domain.OrderState",
  "eventTypeFqn" : "click.kamil.domain.OrderEvent",
  "metadata" : {
    "triggers" : [ {
      "event" : "event",
      "className" : "click.kamil.service.StateMachineServiceImpl",
      "methodName" : "sendMessage",
      "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
      "sourceModule" : null,
      "stateMachineId" : null,
      "sourceState" : null,
      "lineNumber" : 25,
      "polymorphicEvents" : null,
      "external" : false,
      "constraint" : "event instanceof OrderEvent",
      "ambiguous" : false
    }, {
      "event" : "eventProvider",
      "className" : "click.kamil.service.StateMachineServiceImpl",
      "methodName" : "sendMessageWithProvider",
      "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
      "sourceModule" : null,
      "stateMachineId" : null,
      "sourceState" : null,
      "lineNumber" : 50,
      "polymorphicEvents" : null,
      "external" : false,
      "constraint" : "event != null",
      "ambiguous" : false
    }, {
      "event" : "customMessage",
      "className" : "click.kamil.service.StateMachineServiceImpl",
      "methodName" : "sendCustomMessage",
      "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
      "sourceModule" : null,
      "stateMachineId" : null,
      "sourceState" : null,
      "lineNumber" : 78,
      "polymorphicEvents" : null,
      "external" : false,
      "constraint" : null,
      "ambiguous" : false
    } ],
    "entryPoints" : [ {
      "type" : "REST",
      "name" : "POST /api/orders/process",
      "className" : "click.kamil.web.OrderController",
      "methodName" : "processOrder",
      "sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
      "metadata" : {
        "path" : "/api/orders/process",
        "verb" : "POST"
      },
      "parameters" : [ ]
    }, {
      "type" : "REST",
      "name" : "POST /api/orders/complete",
      "className" : "click.kamil.web.OrderController",
      "methodName" : "completeOrder",
      "sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
      "metadata" : {
        "path" : "/api/orders/complete",
        "verb" : "POST"
      },
      "parameters" : [ ]
    }, {
      "type" : "REST",
      "name" : "POST /api/orders/cancel",
      "className" : "click.kamil.web.OrderController",
      "methodName" : "cancelOrder",
      "sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
      "metadata" : {
        "path" : "/api/orders/cancel",
        "verb" : "POST"
      },
      "parameters" : [ ]
    }, {
      "type" : "REST",
      "name" : "POST /api/orders/functional-complete",
      "className" : "click.kamil.web.OrderController",
      "methodName" : "functionalCompleteOrder",
      "sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
      "metadata" : {
        "path" : "/api/orders/functional-complete",
        "verb" : "POST"
      },
      "parameters" : [ ]
    }, {
      "type" : "RABBIT",
      "name" : "RABBIT: order.custom.transition.queue",
      "className" : "click.kamil.web.RabbitOrderListener",
      "methodName" : "handleCustomTransition",
      "sourceFile" : "web/src/main/java/click/kamil/web/RabbitOrderListener.java",
      "metadata" : {
        "protocol" : "RABBIT",
        "destination" : "order.custom.transition.queue"
      },
      "parameters" : [ {
        "name" : "payload",
        "type" : "String",
        "annotations" : [ ]
      } ]
    }, {
      "type" : "JMS",
      "name" : "JMS: order.process.queue",
      "className" : "click.kamil.web.JmsOrderListener",
      "methodName" : "receiveProcessCommand",
      "sourceFile" : "web/src/main/java/click/kamil/web/JmsOrderListener.java",
      "metadata" : {
        "protocol" : "JMS",
        "destination" : "order.process.queue"
      },
      "parameters" : [ {
        "name" : "message",
        "type" : "String",
        "annotations" : [ ]
      } ]
    }, {
      "type" : "JMS",
      "name" : "JMS: order.cancel.queue",
      "className" : "click.kamil.web.JmsOrderListener",
      "methodName" : "receiveCancelCommand",
      "sourceFile" : "web/src/main/java/click/kamil/web/JmsOrderListener.java",
      "metadata" : {
        "protocol" : "JMS",
        "destination" : "order.cancel.queue"
      },
      "parameters" : [ {
        "name" : "message",
        "type" : "String",
        "annotations" : [ ]
      } ]
    } ],
    "callChains" : [ {
      "entryPoint" : {
        "type" : "REST",
        "name" : "POST /api/orders/process",
        "className" : "click.kamil.web.OrderController",
        "methodName" : "processOrder",
        "sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
        "metadata" : {
          "path" : "/api/orders/process",
          "verb" : "POST"
        },
        "parameters" : [ ]
      },
      "methodChain" : [ "click.kamil.web.OrderController.processOrder", "click.kamil.service.StateMachineServiceImpl.sendMessageWithOutbox", "click.kamil.service.StateMachineServiceImpl.sendMessage" ],
      "triggerPoint" : {
        "event" : "click.kamil.domain.OrderEvent.PROCESS",
        "className" : "click.kamil.service.StateMachineServiceImpl",
        "methodName" : "sendMessage",
        "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
        "sourceModule" : null,
        "stateMachineId" : null,
        "sourceState" : "click.kamil.domain.OrderState.NEW",
        "lineNumber" : 25,
        "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.PROCESS" ],
        "external" : false,
        "constraint" : "event instanceof OrderEvent",
        "ambiguous" : false
      },
      "contextMachineId" : null,
      "matchedTransitions" : [ {
        "sourceState" : "click.kamil.domain.OrderState.NEW",
        "targetState" : "click.kamil.domain.OrderState.PROCESSING",
        "event" : "click.kamil.domain.OrderEvent.PROCESS"
      } ],
      "linkResolution" : "RESOLVED"
    }, {
      "entryPoint" : {
        "type" : "REST",
        "name" : "POST /api/orders/complete",
        "className" : "click.kamil.web.OrderController",
        "methodName" : "completeOrder",
        "sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
        "metadata" : {
          "path" : "/api/orders/complete",
          "verb" : "POST"
        },
        "parameters" : [ ]
      },
      "methodChain" : [ "click.kamil.web.OrderController.completeOrder", "click.kamil.service.StateMachineServiceImpl.sendMessage" ],
      "triggerPoint" : {
        "event" : "click.kamil.domain.OrderEvent.COMPLETE",
        "className" : "click.kamil.service.StateMachineServiceImpl",
        "methodName" : "sendMessage",
        "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
        "sourceModule" : null,
        "stateMachineId" : null,
        "sourceState" : "click.kamil.domain.OrderState.PROCESSING",
        "lineNumber" : 25,
        "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.COMPLETE" ],
        "external" : false,
        "constraint" : "event instanceof OrderEvent",
        "ambiguous" : false
      },
      "contextMachineId" : null,
      "matchedTransitions" : [ {
        "sourceState" : "click.kamil.domain.OrderState.PROCESSING",
        "targetState" : "click.kamil.domain.OrderState.COMPLETED",
        "event" : "click.kamil.domain.OrderEvent.COMPLETE"
      } ],
      "linkResolution" : "RESOLVED"
    }, {
      "entryPoint" : {
        "type" : "REST",
        "name" : "POST /api/orders/cancel",
        "className" : "click.kamil.web.OrderController",
        "methodName" : "cancelOrder",
        "sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
        "metadata" : {
          "path" : "/api/orders/cancel",
          "verb" : "POST"
        },
        "parameters" : [ ]
      },
      "methodChain" : [ "click.kamil.web.OrderController.cancelOrder", "click.kamil.service.StateMachineServiceImpl.sendMessage" ],
      "triggerPoint" : {
        "event" : "click.kamil.domain.OrderEvent.CANCEL",
        "className" : "click.kamil.service.StateMachineServiceImpl",
        "methodName" : "sendMessage",
        "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
        "sourceModule" : null,
        "stateMachineId" : null,
        "sourceState" : null,
        "lineNumber" : 25,
        "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.CANCEL" ],
        "external" : false,
        "constraint" : "event instanceof OrderEvent",
        "ambiguous" : true
      },
      "contextMachineId" : null,
      "matchedTransitions" : null,
      "linkResolution" : "AMBIGUOUS_WIDEN"
    }, {
      "entryPoint" : {
        "type" : "REST",
        "name" : "POST /api/orders/functional-complete",
        "className" : "click.kamil.web.OrderController",
        "methodName" : "functionalCompleteOrder",
        "sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
        "metadata" : {
          "path" : "/api/orders/functional-complete",
          "verb" : "POST"
        },
        "parameters" : [ ]
      },
      "methodChain" : [ "click.kamil.web.OrderController.functionalCompleteOrder", "click.kamil.web.OrderController.triggerTransitionFunction", "click.kamil.service.StateMachineServiceImpl.sendMessage" ],
      "triggerPoint" : {
        "event" : "click.kamil.domain.OrderEvent.COMPLETE",
        "className" : "click.kamil.service.StateMachineServiceImpl",
        "methodName" : "sendMessage",
        "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
        "sourceModule" : null,
        "stateMachineId" : null,
        "sourceState" : "click.kamil.domain.OrderState.PROCESSING",
        "lineNumber" : 25,
        "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.COMPLETE" ],
        "external" : false,
        "constraint" : "event instanceof OrderEvent",
        "ambiguous" : false
      },
      "contextMachineId" : null,
      "matchedTransitions" : [ {
        "sourceState" : "click.kamil.domain.OrderState.PROCESSING",
        "targetState" : "click.kamil.domain.OrderState.COMPLETED",
        "event" : "click.kamil.domain.OrderEvent.COMPLETE"
      } ],
      "linkResolution" : "RESOLVED"
    }, {
      "entryPoint" : {
        "type" : "RABBIT",
        "name" : "RABBIT: order.custom.transition.queue",
        "className" : "click.kamil.web.RabbitOrderListener",
        "methodName" : "handleCustomTransition",
        "sourceFile" : "web/src/main/java/click/kamil/web/RabbitOrderListener.java",
        "metadata" : {
          "protocol" : "RABBIT",
          "destination" : "order.custom.transition.queue"
        },
        "parameters" : [ {
          "name" : "payload",
          "type" : "String",
          "annotations" : [ ]
        } ]
      },
      "methodChain" : [ "click.kamil.web.RabbitOrderListener.handleCustomTransition", "click.kamil.service.StateMachineServiceImpl.sendCustomMessage" ],
      "triggerPoint" : {
        "event" : "new CustomStateMachineMessage<>(OrderEvent.PROCESS,\"My Rabbit Custom Payload: \" + payload)",
        "className" : "click.kamil.service.StateMachineServiceImpl",
        "methodName" : "sendCustomMessage",
        "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
        "sourceModule" : null,
        "stateMachineId" : null,
        "sourceState" : "click.kamil.domain.OrderState.NEW",
        "lineNumber" : 78,
        "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.PROCESS" ],
        "external" : false,
        "constraint" : null,
        "ambiguous" : false
      },
      "contextMachineId" : null,
      "matchedTransitions" : [ {
        "sourceState" : "click.kamil.domain.OrderState.NEW",
        "targetState" : "click.kamil.domain.OrderState.PROCESSING",
        "event" : "click.kamil.domain.OrderEvent.PROCESS"
      } ],
      "linkResolution" : "RESOLVED"
    }, {
      "entryPoint" : {
        "type" : "JMS",
        "name" : "JMS: order.process.queue",
        "className" : "click.kamil.web.JmsOrderListener",
        "methodName" : "receiveProcessCommand",
        "sourceFile" : "web/src/main/java/click/kamil/web/JmsOrderListener.java",
        "metadata" : {
          "protocol" : "JMS",
          "destination" : "order.process.queue"
        },
        "parameters" : [ {
          "name" : "message",
          "type" : "String",
          "annotations" : [ ]
        } ]
      },
      "methodChain" : [ "click.kamil.web.JmsOrderListener.receiveProcessCommand", "click.kamil.service.StateMachineServiceImpl.sendMessageWithOutbox", "click.kamil.service.StateMachineServiceImpl.sendMessage" ],
      "triggerPoint" : {
        "event" : "click.kamil.domain.OrderEvent.PROCESS",
        "className" : "click.kamil.service.StateMachineServiceImpl",
        "methodName" : "sendMessage",
        "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
        "sourceModule" : null,
        "stateMachineId" : null,
        "sourceState" : "click.kamil.domain.OrderState.NEW",
        "lineNumber" : 25,
        "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.PROCESS" ],
        "external" : false,
        "constraint" : "event instanceof OrderEvent",
        "ambiguous" : false
      },
      "contextMachineId" : null,
      "matchedTransitions" : [ {
        "sourceState" : "click.kamil.domain.OrderState.NEW",
        "targetState" : "click.kamil.domain.OrderState.PROCESSING",
        "event" : "click.kamil.domain.OrderEvent.PROCESS"
      } ],
      "linkResolution" : "RESOLVED"
    }, {
      "entryPoint" : {
        "type" : "JMS",
        "name" : "JMS: order.cancel.queue",
        "className" : "click.kamil.web.JmsOrderListener",
        "methodName" : "receiveCancelCommand",
        "sourceFile" : "web/src/main/java/click/kamil/web/JmsOrderListener.java",
        "metadata" : {
          "protocol" : "JMS",
          "destination" : "order.cancel.queue"
        },
        "parameters" : [ {
          "name" : "message",
          "type" : "String",
          "annotations" : [ ]
        } ]
      },
      "methodChain" : [ "click.kamil.web.JmsOrderListener.receiveCancelCommand", "click.kamil.service.StateMachineServiceImpl.sendMessageWithProvider" ],
      "triggerPoint" : {
        "event" : "click.kamil.domain.OrderEvent.CANCEL",
        "className" : "click.kamil.service.StateMachineServiceImpl",
        "methodName" : "sendMessageWithProvider",
        "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
        "sourceModule" : null,
        "stateMachineId" : null,
        "sourceState" : null,
        "lineNumber" : 50,
        "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.CANCEL" ],
        "external" : false,
        "constraint" : "event != null",
        "ambiguous" : true
      },
      "contextMachineId" : null,
      "matchedTransitions" : null,
      "linkResolution" : "AMBIGUOUS_WIDEN"
    } ],
    "properties" : {
      "default" : { }
    }
  }
}
