持续一段时间后如何使Informatica中的计时器任务成功 [英] How to make timer task in informatica succeed after a duration

查看:82
本文介绍了持续一段时间后如何使Informatica中的计时器任务成功的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇如何使计时器任务的状态更改成功?我有很多会话,其中有些是串联连接的,有些是并行连接的...在每个会话成功运行之后,计时器任务的状态仍显示为正在运行...如何使它也成功更改...条件是,如果工作流在分配的20分钟以下完成,计时器任务必须更改为成功,但是如果超过20分钟,则应向已分配的用户发送电子邮件并中止工作流.....

I'm curious as to how to make the status of the timer task changes to succeed? I have many sessions whereby some of them are connected in series and some are in parallel... After every session has run successfully, the status of the timer task is still showing running... How do I make it change to succeed as well... The condition is if the workflow finishes below the allocated time of 20 minutes, the timer task has to change to succeed, but if it exceeds 20 minutes, then it should send an email to the assigned user and abort the workflow.....

Unix:

 if[[ $Event_Exceed20min > 20 AND $EVent_Exceed20min.Status = Running ]]
    pmcmd stopworkflow -service informatica-integration-Service -d domain-name - u user-name -p password -f folder-name -w workflow-name
    $Event_Exceed20min.Status = SUCCEEDED
 fi

推荐答案

您可以使用UNIX脚本执行此操作.我看不到只有Informatica可以做到这一点.
您可以使用pmcmd创建脚本,以启动informatica,
继续轮询状态.

You can use UNIX script to do this. I dont see informatica alone can do this.
You can create a script which will kick off the informatica using pmcmd,
keep polling the status.

  1. 启动流程并启动计时器
  2. 开始检查状态
  3. 如果计时器> 1200秒,则中止并发送邮件,否则继续轮询

下面截取的代码...

Code sniped below...

#!/bin/bash

wf=$1
sess=$2
mailids="xyz@abc.com,abc@goog.com"
log="~/log/"$wf"log.txt"

echo "Start Workflow..."> $log
pmcmd  startworkflow -sv service -d domain -u username -p password  -f "FolderName" $wf

#Timer starts, works only in BASH
start=$SECONDS

while :
do
    #Check Timer, if >20min abort the flow.
    end=$SECONDS
    duration=$(( end - start ))
    if [ $duration -gt 1200 ]; then
    pmcmd stopworkflow -sv service -d domain -u username -p password -f prd_CLAIMS  -w  $wf
    STAT=$?
    #Error check if not aborted
    mailx -s "Workflow took >20min so aborted" $mailids
    fi

    pmcmd getsessionstatistics -sv service -d domain -u username -p password  -f prd_CLAIMS -w  $wf $sess > ~/log/tmp.txt
    STAT=$?
    if [ "$STAT" != 0 ]; then
    echo "Staus check failed" >> $log
    fi
    echo $(grep "[Succeeded] " ~/log/tmp.txt| wc -l) > ~/log/tmp2.txt
    STAT=$?
    if [ -s ~/log/tmp2.txt ]; then
    echo "Workflow Succeeded...">> $log
    exit
    fi
    sleep 30
done

echo "End Workflow...">> $log

这篇关于持续一段时间后如何使Informatica中的计时器任务成功的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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