Maximo:使用SQL查询模拟工作流分配 [英] Maximo: Mimic Workflow assignments with an SQL query

查看:136
本文介绍了Maximo:使用SQL查询模拟工作流分配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个模仿Maximo Start Center分配部分中结果的SQL查询.分配是工作流程分配.

I want to write an SQL query that mimics the results in the Maximo Start Center assignments section. The assignments are workflow assignments.

我尝试查询workorder表并指定用户所在的assignedownergroup:

I tried querying the workorder table and specifying the assignedownergroup that the user is in:

select
    *
from
    workorder
where
    status in ('WAPPR','APPR','INPRG')
    and assignedownergroup = 'FIRE'

但是,查询返回的工作单比Start Center分配中显示的要多.

However, the query returns more work orders than what's shown in the Start Center assignments.

如何在启动中心"中编写查询来模拟工作流程分配?

推荐答案

如果您突出显示的portlet是针对WORKORDER的结果集,但我的其他答案将起作用.您突出显示的portlet是基于WFASSIGNMENT where assigncode = 'userid'的工作流收件箱.

My other answer would work if the portlet you highlighted was a Result Set against WORKORDER, but it is not. The portlet you have highlighted is the Workflow Inbox, which is based on WFASSIGNMENT where assigncode = 'userid'.

在Oracle SQL中,模仿工作流收件箱的完整查询如下所示:

A full query that mimics the workflow inbox would look like this, in Oracle SQL:

select
    (select 'WO '||wonum||' ('||description||') is waiting for '||wfassignment.description 
        from workorder 
        where workorderid = wfassignment.ownerid
            and wfassignment.ownertable = 'WORKORDER'
        /* Union in other tables */) description,
    app
from wfassignment
where assignstatus = 'ACTIVE'
    and assigncode = 'JDOE'

我不确定作业说明中WO前缀的来源.但是,由于您可以基于自己的对象将工作流添加到自己的应用程序中,因此我想它来自某个地方的元数据而不是代码.并且说明本身可能是MAXMESSAGES中的格式字符串.

I'm not sure where the WO prefix on the assignment description comes from. But since you could add workflow to your own app based on your own object, I would like to think it comes from metadata somewhere instead of code. And the description itself is probably a format string in MAXMESSAGES.

您会在我的查询中注意到Union in注释,在该注释中将针对PRPMASSET或其他内容添加union ed查询.

You'll notice the Union in comment in my query, where you would add unioned queries against PR or PM or ASSET or whatever.

这篇关于Maximo:使用SQL查询模拟工作流分配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆