eventmesh-examples/src/main/java/org/apache/eventmesh/grpc/sub/WorkflowExpressAsyncSubscribe.java [82:99]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Optional<EventMeshMessage> handle(final EventMeshMessage msg) throws Exception {
        log.info("receive async msg: {}", msg);
        if (msg == null) {
            log.info("async msg is null, workflow end.");
            return Optional.empty();
        }

        final Map<String, String> props = msg.getProp();
        final String workflowInstanceId = props.get("workflowinstanceid");
        final String taskInstanceId = props.get("workflowtaskinstanceid");

        final ExecuteRequest executeRequest = ExecuteRequest.newBuilder().setId("testcreateworkflow")
            .setTaskInstanceId(taskInstanceId)
            .setInstanceId(workflowInstanceId).build();
        final ExecuteResponse response = workflowClient.getWorkflowClient().execute(executeRequest);
        log.info("receive workflow msg: {}", response.getInstanceId());
        return Optional.empty();
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



eventmesh-examples/src/main/java/org/apache/eventmesh/grpc/sub/WorkflowPaymentAsyncSubscribe.java [82:99]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Optional<EventMeshMessage> handle(final EventMeshMessage msg) throws Exception {
        log.info("receive async msg: {}", msg);
        if (msg == null) {
            log.info("async msg is null, workflow end.");
            return Optional.empty();
        }

        final Map<String, String> props = msg.getProp();
        final String workflowInstanceId = props.get("workflowinstanceid");
        final String taskInstanceId = props.get("workflowtaskinstanceid");

        final ExecuteRequest executeRequest = ExecuteRequest.newBuilder().setId("testcreateworkflow")
            .setTaskInstanceId(taskInstanceId)
            .setInstanceId(workflowInstanceId).build();
        final ExecuteResponse response = workflowClient.getWorkflowClient().execute(executeRequest);
        log.info("receive workflow msg: {}", response.getInstanceId());
        return Optional.empty();
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



