package com.ningdatech.pmapi.instance;

import com.alibaba.fastjson.JSON;
import com.ningdatech.pmapi.AppTests;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import org.flowable.engine.RuntimeService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Classname InstanceTest
 * @Description
 * @Date 2023/2/16 14:44
 * @Author PoffyZhang
 */
public class InstanceTest extends AppTests {

    @Autowired
    private RuntimeService runtimeService;

    @Test
    public void test(){
        String instanceId = "896fa188-96d8-11ed-9539-e2d4e8f16b2f";
        Object user = runtimeService.getVariable(instanceId,
                "owner");
        System.out.println(JSON.toJSONString(user));
    }
}
