工作流审批退回,撤销API

审批退回API

mutation {
  workflowUserTaskMutation {
    approveRejust(
      workflowUserTask: {id: 701530152718787758, userTaskViewName: "工作流任务待办xml_workflow", userTaskReadonlyViewName: "工作流任务待办detail_workflow", source: "超级管理员", statusDisplayName: "待处理", avatarUrl: "https://pamirs.oss-cn-hangzhou.aliyuncs.com/oinone/img/workflow/default.png", name: "测试流程", instanceId: 701530152718787737, taskId: 701530152718787756, definitionId: 701530152718787698, definitionVersion: 34, canAddSignApproval: false, content: null, nodeId: "APPROVAL0000000000014502", userType: USER_TYPE_USER, userId: 10001, model: "top.Teacher", nodeContext: "{\"id\":\"700755598316612629\",\"teacherName\":\"1234312\",\"readStatus\":\"NO_READ\",\"pamirsUser\":[]}", taskType: APPROVE, viewId: 701530152718787696, viewReadonlyId: 701530152718787697, taskCreateDate: "2025-01-22 14:31:12", flowCreateDate: "2025-01-22 14:30:50", allowTransfer: false, allowAddSign: false, allowFallback: true, allowStaging: true, allowAgree: true, allowReject: true, readConfirm: false, mustReason: false, isUrge: false, status: ACTIVE, filterAddSign: "id>=0 ", filterTransfer: "id>=0 ", hasFallback: true, workflowBackNode: {id: 701530152718787702, fallBackNodeName: "填写"}, filterFallBackNodeIds: "'WRITE0000000000014501'"}
    ) {
      id
      addSignUserId
      transferUserId
      workflowBackNodeId
      enableCustomView
      isCopy
      isRecall
      isClose
      isFallBack
      operateType
      workflowModule {
        id
        logo
        bitOptions
        attributes
        displayName
        sys
        name
        systemSource
        module
        sign
        abbr
        hash
        dsKey
        summary
        description
        state
        boot
        application
        latestVersion
        platformVersion
        publishedVersion
        publishCount
        defaultCategory
        category
        moduleDependencies
        moduleExclusions
        moduleUpstreams
        excludeHooks
        priority
        website
        author
        demo
        web
        license
        toBuy
        maintainer
        contributors
        url
        selfBuilt
        metaSource
        clientTypes
        show
        defaultHomePageModel
        homePageModel
        defaultHomePageName
        homePageName
        defaultLogo
        createDate
        writeDate
        createUid
        writeUid
      }
      module
      userTaskViewName
      userTaskReadonlyViewName
      source
      fromDepartment
      fromCorpName
      fromCorpLogo
      fromCorpId
      workflowVersion
      statusDisplayName
      helpDisplayName
      avatarUrl
      name
      title
      workflowUserInstanceId
      instanceId
      instance {
        id
        name
        title
        bizType
        source
        fromDepartment
        fromCorpName
        fromCorpLogo
        fromCorpId
        workflowVersion
        module
        version
        definitionCode
        workflowDCode
        currentNodeName
        triggerType
        status
        startDate
        endDate
        instanceCostTime
        context
        originNodeContext
        runtimeDefinition
        model
        errorMessage
        notifyErrorMessage
        parentTaskInstanceId
        masterInstanceId
        parentInstanceId
        isAsync
        initiatorUid
        currentNodeTag
        currentNodeId
        isUrge
        canUrge
        lastUrgeTime
        taskType
        hasApproval
        hasWrite
        taskPassedStatus
        tmpTaskType
        tmpTaskPassedStatus
        canRecall
        nodeContextSummary
        instanceStatusDisplayName
        dataBizId
        hasSaved
        createDate
        writeDate
        createUid
        writeUid
      }
      taskId
      taskInstance {
        id
        endFunId
        workflowName
        module
        workflowInstanceId
        nodeId
        nodeTag
        nodeName
        nodeDisplayName
        nodeDataId
        nodeDataIsCreateData
        nodeDesc
        autoPass
        isCurrent
        isHistory
        version
        orderNumber
        startDate
        finishDate
        taskCostTime
        status
        lastTaskInstanceId
        lastNodeId
        lastStatus
        hasFallback
        fallBackNodeId
        fallBackTaskInstanceId
        belongBranchIndex
        belongBranchNodeId
        deph
        errorMessage
        nodeContext
        model
        nodeDataBizId
        nodeDataBizIds
        originNodeContext
        dataSaveType
        hasSaved
        result
        missData
        locked
        branchCount
        passedBranchs
        postTime
        isDeadlineOperate
        lastUrgeTime
        canUrge
        isUrge
        isRecall
        belongLoopNodeId
        loopCurrent
        loopEnd
        isLoop
        enableEndFun
        isClose
        createDate
        writeDate
        createUid
        writeUid
      }
      definitionId
      definitionVersion
      canAddSignApproval
      flowDesc
      content
      nodeId
      nodeName
      nodeDesc
      userType
      userId
      employeeId
      roleId
      deptId
      nodePersonUser {
        userId
        userName
        avatarUrl
        status
        result
        remark
        pics
        addSignRemark
        addSignPics
      }
      model
      modelName
      nodeDataBizId
      nodeDataBizIds
      originNodeContext
      nodeContext
      nodeContextSummary
      taskType
      taskPassedStatus
      viewId
      viewReadonlyId
      taskCreateDate
      taskFinishDate
      flowCreateDate
      allowTransfer
      allowAddSign
      allowModify
      allowFallback
      allowStaging
      allowAgree
      allowReject
      allowPost
      deadlineType
      allowAutoTransfer
      allowAutoAgree
      deadline
      remindMinuteEnable
      remindMinute
      remindMinuteUnit
      deadlineStatus
      readDone
      readConfirm
      remindContent
      remindNum
      isDeadlineOperate
      mustReason
      isUrge
      logDetails {
        id
        workflowUserTaskLogId
        taskId
        orderNumber
        nodeName
        instanceId
        startDate
        finishDate
        operator
        operation
        operationName
        nodeType
        remark
        createDate
        writeDate
        createUid
        writeUid
      }
      historyTasks {
        id
        workflowUserTaskId
        nodeId
        nodeTag
        status
        createDate
        writeDate
        createUid
        writeUid
      }
      status
      result
      remark
      opRemark
      addSignUser {
        id
        code
        teacherId
        employeeType
        name
        jobNum
        dataStatus
        companyCode
        departmentCode
        departmentTreeCode
        bindingUserId
        isMaster
        userEmail
        login
        phone
        initialPassword
        bindingMode
        createDate
        createUserName
        writeDate
        writeUserName
        createUid
        writeUid
      }
      transferUser {
        id
        code
        teacherId
        employeeType
        name
        jobNum
        dataStatus
        companyCode
        departmentCode
        departmentTreeCode
        bindingUserId
        isMaster
        userEmail
        login
        phone
        initialPassword
        bindingMode
        createDate
        createUserName
        writeDate
        writeUserName
        createUid
        writeUid
      }
      autoTransferUsers {
        id
        code
        teacherId
        employeeType
        name
        jobNum
        dataStatus
        companyCode
        departmentCode
        departmentTreeCode
        bindingUserId
        isMaster
        userEmail
        login
        phone
        initialPassword
        bindingMode
        createDate
        createUserName
        writeDate
        writeUserName
        createUid
        writeUid
      }
      selectType
      transferInfo {
        id
        nodeId
        name
        exp
        type
        count
        model
        filed
        isMulti
      }
      addSignInfo {
        id
        nodeId
        name
        exp
        type
        count
        model
        filed
        isMulti
      }
      transferPerson {
        id
        nodeId
        name
        exp
        type
        count
        model
        filed
        isMulti
      }
      addSignPerson {
        id
        nodeId
        name
        exp
        type
        count
        model
        filed
        isMulti
      }
      isAutoTransfer
      filterAddSign
      filterTransfer
      filterAutoTransfer
      canOperate
      hasAddSign
      operation
      initiator {
        id
        code
        countryId
        avatarMediumId
        currencyId
        avatarBigId
        themeId
        signUpType
        userType
        login
        phoneCode
        phone
        email
        initialPassword
        isInitialPassword
        password
        source
        active
        name
        nickname
        realname
        avatarUrl
        langId
        timeZoneType
        contactPhone
        contactEmail
        birthday
        gender
        idCard
        regDate
        createDate
        createUserName
        writeDate
        writeUserName
        createUid
        writeUid
      }
      createDate
      initiatorUid
      hasFallback
      workflowBackNode {
        id
        nodeId
        fallBackNodeId
        fallBackNodeName
        fallBackNodeLabel
        definitionId
        workflowCode
        nodeModel
        nodeModelId
        createDate
        writeDate
        createUid
        writeUid
      }
      emptyWorkflowBackNode
      filterFallBackNodeIds
      flowTreeJson
      taskTime
      isMobile
      nodeInfos {
        orderNum
        taskInstanceId
        branchOrderNum
        branchUniqueCode
        branchName
        isSelected
        isPassed
        isHistory
        hasStart
        fallbackTaskInstanceId
        taskFinishedDate
        nodeId
        nodeName
        nodeTag
        remark
        userId
        isDottedLine
        userName
        avatarUrl
        taskInstanceStatus
        statusDisplayName
        pics
        addSignRemark
        addSignPics
        canUrge
      }
      writeDate
      instanceStatusDisplayName
      fallBackNodeId
      needSendMessage
      pics
      attachments {
        id
        code
        name
        url
        type
        size
        mime
        isPublic
        resId
        resType
        createDate
        writeDate
        createUid
        writeUid
      }
      addSignRemark
      addSignPics
      addSignAttachments {
        id
        code
        name
        url
        type
        size
        mime
        isPublic
        resId
        resType
        createDate
        writeDate
        createUid
        writeUid
      }
      mainModel
      dataBizId
      createUid
      sharingUser {
        id
        code
        teacherId
        employeeType
        name
        jobNum
        dataStatus
        companyCode
        departmentCode
        departmentTreeCode
        bindingUserId
        isMaster
        userEmail
        login
        phone
        initialPassword
        bindingMode
        createDate
        createUserName
        writeDate
        writeUserName
        createUid
        writeUid
      }
      writeUid
    }
  }
}

撤销API

mutation {
  workBenchWorkflowUserTaskInitiateMutation {
    recall(
      workflowUserTaskInitiate: {id: 701530152718787737, tag: TAG_PASS, initiateSelect: TOTAL, taskTypeSelect: TOTAL, name: "测试流程", workflowModule: {id: 644013028727063175, displayName: "oinone功能展示", module: "top_demo"}, source: "超级管理员", module: "top_demo", status: PROCESSING, canUrge: true, canRecall: true, createDate: "2025-01-22 14:30:50"}
    ) {
      id
      tag
      initiateSelect
      taskTypeSelect
      name
      title
      bizType
      workflowModule {
        id
        logo
        bitOptions
        attributes
        displayName
        sys
        name
        systemSource
        module
        sign
        abbr
        hash
        dsKey
        summary
        description
        state
        boot
        application
        latestVersion
        platformVersion
        publishedVersion
        publishCount
        defaultCategory
        category
        moduleDependencies
        moduleExclusions
        moduleUpstreams
        excludeHooks
        priority
        website
        author
        demo
        web
        license
        toBuy
        maintainer
        contributors
        url
        selfBuilt
        metaSource
        clientTypes
        show
        defaultHomePageModel
        homePageModel
        defaultHomePageName
        homePageName
        defaultLogo
        createDate
        writeDate
        createUid
        writeUid
      }
      source
      fromDepartment
      fromCorpName
      fromCorpLogo
      fromCorpId
      workflowVersion
      module
      version
      definition {
        id
        code
        initiatorId
        bizType
        triggerType
        module
        content
        version
        active
        workflowCode
        workflowName
        designerContent
        createDate
        writeDate
        createUid
        writeUid
      }
      definitionCode
      workflowDCode
      currentNodeName
      triggerType
      status
      startDate
      endDate
      instanceCostTime
      context
      originNodeContext
      runtimeDefinition
      workflowTaskInstances {
        id
        endFunId
        workflowName
        module
        workflowInstanceId
        nodeId
        nodeTag
        nodeName
        nodeDisplayName
        nodeDataId
        nodeDataIsCreateData
        nodeDesc
        autoPass
        isCurrent
        isHistory
        version
        orderNumber
        startDate
        finishDate
        taskCostTime
        status
        lastTaskInstanceId
        lastNodeId
        lastStatus
        hasFallback
        fallBackNodeId
        fallBackTaskInstanceId
        belongBranchIndex
        belongBranchNodeId
        deph
        errorMessage
        nodeContext
        model
        nodeDataBizId
        nodeDataBizIds
        originNodeContext
        dataSaveType
        hasSaved
        result
        missData
        locked
        branchCount
        passedBranchs
        postTime
        isDeadlineOperate
        lastUrgeTime
        canUrge
        isUrge
        isRecall
        belongLoopNodeId
        loopCurrent
        loopEnd
        isLoop
        enableEndFun
        isClose
        createDate
        writeDate
        createUid
        writeUid
      }
      modelDefinition {
        id
        labelFields
        attributes
        label
        bitOptions
        sys
        sign
        systemSource
        hash
        pk
        module
        dsModule
        moduleName
        moduleAbbr
        model
        displayName
        name
        lname
        table
        dsKey
        remark
        type
        multiTable
        multiTableTypeField
        multiTableType
        redundancy
        proxy
        isRelationship
        summary
        description
        priority
        dataManager
        ordering
        sequenceCode
        superModels
        unInheritedFields
        unInheritedFunctions
        uniques
        indexes
        logicDelete
        logicDeleteColumn
        logicDeleteValue
        logicNotDeleteValue
        optimisticLockerField
        underCamel
        capitalMode
        charset
        collate
        categoryId
        show
        createDate
        writeDate
        createUid
        writeUid
      }
      model
      aliveUserTask {
        id
        addSignUserId
        transferUserId
        workflowBackNodeId
        enableCustomView
        isCopy
        isRecall
        isClose
        isFallBack
        operateType
        module
        userTaskViewName
        userTaskReadonlyViewName
        source
        fromDepartment
        fromCorpName
        fromCorpLogo
        fromCorpId
        workflowVersion
        statusDisplayName
        helpDisplayName
        avatarUrl
        name
        title
        workflowUserInstanceId
        instanceId
        taskId
        definitionId
        definitionVersion
        canAddSignApproval
        flowDesc
        content
        nodeId
        nodeName
        nodeDesc
        userType
        userId
        employeeId
        roleId
        deptId
        model
        modelName
        nodeDataBizId
        nodeDataBizIds
        originNodeContext
        nodeContext
        nodeContextSummary
        taskType
        taskPassedStatus
        viewId
        viewReadonlyId
        taskCreateDate
        taskFinishDate
        flowCreateDate
        allowTransfer
        allowAddSign
        allowModify
        allowFallback
        allowStaging
        allowAgree
        allowReject
        allowPost
        deadlineType
        allowAutoTransfer
        allowAutoAgree
        deadline
        remindMinuteEnable
        remindMinute
        remindMinuteUnit
        deadlineStatus
        readDone
        readConfirm
        remindContent
        remindNum
        isDeadlineOperate
        mustReason
        isUrge
        status
        result
        remark
        opRemark
        selectType
        isAutoTransfer
        filterAddSign
        filterTransfer
        filterAutoTransfer
        canOperate
        hasAddSign
        operation
        createDate
        initiatorUid
        hasFallback
        emptyWorkflowBackNode
        filterFallBackNodeIds
        flowTreeJson
        taskTime
        isMobile
        writeDate
        instanceStatusDisplayName
        fallBackNodeId
        needSendMessage
        pics
        addSignRemark
        addSignPics
        mainModel
        dataBizId
        createUid
        writeUid
      }
      errorMessage
      notifyErrorMessage
      parentTaskInstanceId
      masterInstanceId
      parentInstanceId
      isAsync
      initiator {
        id
        code
        countryId
        avatarMediumId
        currencyId
        avatarBigId
        themeId
        signUpType
        userType
        login
        phoneCode
        phone
        email
        initialPassword
        isInitialPassword
        password
        source
        active
        name
        nickname
        realname
        avatarUrl
        langId
        timeZoneType
        contactPhone
        contactEmail
        birthday
        gender
        idCard
        regDate
        createDate
        createUserName
        writeDate
        writeUserName
        createUid
        writeUid
      }
      initiatorUid
      currentNodeTag
      currentNodeId
      isUrge
      canUrge
      lastUrgeTime
      taskType
      hasApproval
      hasWrite
      taskPassedStatus
      tmpTaskType
      tmpTaskPassedStatus
      canRecall
      nodeContextSummary
      instanceStatusDisplayName
      dataBizId
      hasSaved
      createDate
      writeDate
      createUid
      writeUid
    }
  }
}

Oinone社区 作者:yexiu原创文章,如若转载,请注明出处:https://doc.oinone.top/other/20354.html

访问Oinone官网:https://www.oinone.top获取数式Oinone低代码应用平台体验

(0)
yexiu的头像yexiu数式员工
上一篇 2025年1月16日 pm10:38
下一篇 2025年1月26日 am11:40

相关推荐

  • 自定义字段样式

    在日常开发中,我们经常会遇到需要根据业务规则动态展示字段样式的场景,比如表格、表单或详情中的某些字段需要改变文字颜色。本文将通过一个具体的案例,带大家实现这一功能。 以下以 自定义表格字段文字颜色 为例。 实现步骤 1. 在界面设计器中添加组件 通过界面设计器,添加一个组件 2. 创建元件 以表格的「金额字段」为例,创建对应的元件(可根据自己的业务场景调整)。 3. 配置元件属性 进入元件设计页面,从组件库中拖入「单行文本」到设计区域。在右侧属性面板中填写相关配置并保存 4. 保存元件 完成配置后,保存元件。 5. 发布元件 将元件发布,供页面设计使用。 6. 切换表格字段 进入页面设计器,将表格中的字段切换为刚刚创建的元件。 7. 配置字段颜色 在右侧属性面板中,配置字段的文字颜色: 固定颜色:直接输入颜色值(如 red)。 动态颜色:输入表达式,根据业务逻辑动态展示颜色。例如:当前行的名称等于 1 时显示红色,否则为蓝色。 示例表达式: activeRecord.name === '1' ? 'red' : 'blue' 8: 在代码中,自定义对应的表格字段 import { SPI, BaseFieldWidget, ModelFieldType, ViewType, TableCurrencyFieldWidget, Widget, RowContext, numberZeroFill, numberAddThousandth, Expression, ExpressionRunParam } from '@kunlun/dependencies'; import { toString } from 'lodash-es'; import { createVNode, VNode } from 'vue'; @SPI.ClassFactory( BaseFieldWidget.Token({ viewType: [ViewType.Table], ttype: [ModelFieldType.Currency], widget: 'TableCurrencyColor' }) ) export class TableCustomCurrencyFieldWidget extends TableCurrencyFieldWidget { computedFieldColor(context: RowContext) { const { fieldColor = ' ' } = this.getDsl(); if (!fieldColor) { return null; } // 如果当前颜色是表达式,则需要计算 if (Expression.hasKeywords(fieldColor)) { const params: ExpressionRunParam = { activeRecords: [context.data], rootRecord: {}, openerRecord: {}, scene: '' }; return Expression.run(params, fieldColor, fieldColor)!; } return fieldColor; } @Widget.Method() public renderDefaultSlot(context: RowContext): VNode[] | string { let value = numberZeroFill(toString(super.compute(context)), this.getPrecision(context)); if (this.getShowThousandth(context)) { value = numberAddThousandth(value); } return [ createVNode( 'div', { style: { color: this.computedFieldColor(context) } }, value ) ]; } } 9: 页面效果图

    2025年1月9日
    5.2K00
  • 流程和任务状态说明文档

    一、工作流实例状态说明 INIT:新的流程创建时,执行工作流实例前的状态。 PROCESSING:发起的新的流程之后,结束之前的状态。 FINISHED:整个流程结束后的状态。 ERROR:流程异常时的状态。 RECALL: 撤销流程实例时的状态 CLOSE:关闭流程实例时(流程撤销)的状态。 一、工作流实例通过状态说明 FILLED:流程走到填写节点,填写人填写过后的状态。 PASS:审批同意操作后的状态。 REJECT:审批结果被拒绝(审批节点结束后)的状态。 ING:新的流程创建时,执行工作流实例前的状态。 ERROR:流程异常时的状态。 RECALL:撤销流程实例时的状态。 RECALL_PASS:无 RECALL_REJECT:无 RECALL_FILLED:无 FALLBACK:已退回时标识抄送/工作流实例为已退回时的状态。 FALLBACK_PASS:无 FALLBACK_REJECT:无 FALLBACK_FILLED:无 TRANSFER:无 CLOSE:关闭流程实例时((流程撤销))的状态。

    2025年6月24日
    32800
  • 后台嵌入其他系统的界面,设计器:嵌入网页组件

    管理后台如何新增Iframe嵌入其他系统的界面: 1、新建一个模型。模型中有放【url】的字段2、3、切换组件4、点击发布5、测试环境验证下,后端那个字段返回嵌入的【url】就可以展示这个url的内容了6、最后效果如下:

    2024年12月27日
    94700
  • 打印支持非存储数据导出

    介绍 平台提供的默认打印功能没有支持非存储数据的导出。我们可以自定义打印导出功能,以满足业务中个性化的需求。 实现思路 重写打印任务模型,添加业务数据字段 自定义打印动作,前端将导出数据放到业务数据字段中 使用导出数据扩展点机制修改导出数据 代码示例 继承平台的打印任务模型,加上需要业务数据字段,这个字段用于传输需要打印的表单数据,但是需要自定义打印的表单往往不止一个,所以需要定义为通用的Object字段。 @Model.model(TransientPdfPrintTask.MODEL_MODEL) @Model(displayName = "传输模型Pdf打印任务") public class TransientPdfPrintTask extends PdfPrintTask { public static final String MODEL_MODEL="demo.TransientPdfPrintTask"; @Field(displayName = "业务数据") private Object businessData; } 自定义打印动作 @Model.model(TransientPdfPrintTask.MODEL_MODEL) @Component public class TransientPdfPrintTaskAction extends AbstractPdfPrintTaskAction<TransientPdfPrintTask> { @Resource private PdfFileService pdfFileService; @Action(displayName = "打印", contextType = ActionContextTypeEnum.CONTEXT_FREE, bindingType = {ViewTypeEnum.TABLE}) @Override public TransientPdfPrintTask createPrintTask(TransientPdfPrintTask data) { return super.createPrintTask(data); } @Override protected void doExport(TransientPdfPrintTask exportTask, PdfDefinitionContext context) { pdfFileService.doExportSync(exportTask, context); } @Function.Advanced(type = FunctionTypeEnum.QUERY) @Function(openLevel = FunctionOpenEnum.API) public TransientPdfPrintTask construct(TransientPdfPrintTask data) { String model = FetchUtil.fetchVariables(PdfConstants.MODEL); data.construct(); data.setModel(model); return data; } } 本篇文章只介绍同步打印,如果异步需要修改doExport方法。 编写导出的数据处理逻辑 @Ext(PdfPrintTask.class) public class PrintExportExt extends AbstractPdfExportFetchDataExtPointImpl implements PdfExportFetchDataExtPoint { // 这里使用扩展点表达式匹配需要打印的非存储模型,只有表达式为true才会走这段逻辑。 @Override @ExtPoint.Implement(expression = "context.model==\"" + ProductPricingClientTransient.MODEL_MODEL + "\"") public List<Object> fetchExportData(PdfPrintTask exportTask, PdfDefinitionContext context) { List<Object> result = new ArrayList<>(); List<Object> dataList = new ArrayList<>(); TransientPdfPrintTask transientPdfPrintTask = new TransientPdfPrintTask(); transientPdfPrintTask.set_d(exportTask.get_d()); dataList.add(transientPdfPrintTask.getBusinessData()); result.add(dataList); return result; } } 前端自定义打印按钮,将数据提交给业务数据字段,并使用同步导出打印。

    2025年10月13日
    41900
  • Oinone 初级学习路径

    文档说明 文档链接 介绍Oinone前端相关知识点 前端基础学习路径 介绍Oinone后端相关知识点 后端基础学习路径 介绍平台基础组件 平台基础组件 介绍平台设计器常用场景实操 设计器基础学习路径 设计器实操案例示例 7.2 实战训练(积分发放)

    2024年6月15日
    96200

Leave a Reply

登录后才能评论