Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9972518BC0 for ; Fri, 24 Apr 2015 09:39:48 +0000 (UTC) Received: (qmail 20868 invoked by uid 500); 24 Apr 2015 09:39:43 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 20824 invoked by uid 500); 24 Apr 2015 09:39:43 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 20811 invoked by uid 99); 24 Apr 2015 09:39:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2015 09:39:43 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: message received from 54.164.171.186 which is an MX secondary for user@uima.apache.org) Received: from [54.164.171.186] (HELO mx1-us-east.apache.org) (54.164.171.186) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2015 09:39:34 +0000 Received: from mail-la0-f48.google.com (mail-la0-f48.google.com [209.85.215.48]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 171CD43CDA for ; Fri, 24 Apr 2015 09:39:14 +0000 (UTC) Received: by layy10 with SMTP id y10so31189935lay.0 for ; Fri, 24 Apr 2015 02:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=CVgm70ze1fRVKkrdNV6bYNfKO63O1w7Ufnkcy2AbiL4=; b=zBpWML6BVJmJnJbzmge2MqyKVjY3LLMwP1fD+ZQeZVHxSD0BBEO73WVbquBYhwxYn8 128tzln/500DP5TkmsPMxKGHCJhZRLOm+D05HrklAv8uNkTM7N2XjhLiyM7vI1X4fcoT Go6kNmO/x7GJQbWZFCQDHgRkI8twDXOY3XYzxQcDbUQp4Atc2KErptJ7HGoIPhN/6v0L d6t0WSB0vrwVL+F95MEFElYZp27Lm/b7olnFLrOTZQW5XrMPHjRqGP6TiGoBcZwUsv5d UfGkKNCJ0gMsjl1FcaI5sjlfFUZoyqsFHNW9o0HhbUqqQUNyBrjCwJTxNksPFnvU2mgO pEgw== X-Received: by 10.152.1.227 with SMTP id 3mr6136463lap.61.1429868262617; Fri, 24 Apr 2015 02:37:42 -0700 (PDT) Received: from [10.0.0.6] ([87.104.236.202]) by mx.google.com with ESMTPSA id oy3sm2496481lbb.1.2015.04.24.02.37.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Apr 2015 02:37:41 -0700 (PDT) From: Mario Gazzo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Error handling in flow control Message-Id: <7FEB93E3-FB74-4F02-90FE-C6C9E885DF40@gmail.com> Date: Fri, 24 Apr 2015 11:37:35 +0200 To: user@uima.apache.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) X-Mailer: Apple Mail (2.2098) X-Virus-Checked: Checked by ClamAV on apache.org I am trying to get error handling to work with a custom flow control. I = need to send status information back to a service after the flow = completed either with or without errors but I can only do this once for = any workflow item because it changes the state of the job, at least = without error replies and wasteful requests. The problem is that I need = to do several retries before finally failing and reporting the status to = a service. First I tried to let the CPE do the retry for me by setting = the max error count but then a new flow object is created every time and = I loose track of the number of retries before this. This means that I = don=E2=80=99t know when to report the status to the service because it = should only happen after the final retry. I then tried to let the flow instance manage the retries by moving back = to the previous step again but then I get the error = =E2=80=9Corg.apache.uima.cas.CASRuntimeException: Data for Sofa feature = setLocalSofaData() has already been set=E2=80=9D, which is because the = document text is set in this particular test case. I then also tried to = reset the CAS completely before retrying the pipeline from scratch and = this of course throws the error =E2=80=9CCASAdminException: Can't flush = CAS, flushing is disabled.=E2=80=9D. It would be less wasteful if only = the failed step is retried instead of the whole pipeline but this = requires clean up, which in some cases might be impossible. It appears = that managing errors can be rather complex because the CAS can be in an = unknown state and an analysis engine operation is not idempotent. I = probably need to start the whole pipeline from the start if I want more = than a single attempt, which gets me back to the problem of tracking the = number of attempts before reporting back to the service. Does anyone have any good suggestion on how to do this in UIMA e.g. = passing state information from a failed flow to the next flow attempt?