From users-return-66856-archive-asf-public=cust-asf.ponee.io@camel.apache.org Wed Jan 10 19:23:41 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 734CE18072F for ; Wed, 10 Jan 2018 19:23:41 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6123C160C2E; Wed, 10 Jan 2018 18:23:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A51FF160C1E for ; Wed, 10 Jan 2018 19:23:40 +0100 (CET) Received: (qmail 32074 invoked by uid 500); 10 Jan 2018 18:23:39 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 32062 invoked by uid 99); 10 Jan 2018 18:23:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jan 2018 18:23:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8E5591808DB for ; Wed, 10 Jan 2018 18:23:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id rUkQy2FjQNSn for ; Wed, 10 Jan 2018 18:23:37 +0000 (UTC) Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id ADDAD5F250 for ; Wed, 10 Jan 2018 18:23:36 +0000 (UTC) Received: by mail-wm0-f47.google.com with SMTP id 81so2991620wmb.1 for ; Wed, 10 Jan 2018 10:23:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=zAh02HjxBOk2KRUatJRxDx5NVku2HqOvbJha2+jVU+M=; b=l7wqyvPfP7nWFPzyv3JWi/xN9rvQioiqJgNWsIFVQ4S1eB+3sWuhEMHiAb8YvBSb2Y RoAeTLeSsBYG2ovegtDpTm+G6Rx0vl7faoiKnWa+nZr4O2WkH+4Ib03/FkmX8DPY11Cl hsVRjo1gKRqWXOnOGKTSzrgf2pcLYv/Hj1PrjDuh8JD++nLs3u5tpJWD6ZgDx2WKX+fD AAKDA6VyPniawhHEk3u4JKk9jrxHLkXokNlY5V1DtucLCRrhH2+oucKiK/exW95MgkR8 4mFrmAmcy5csjY5dhrwiBQ4vAb1zSJ2uPIzDC5lFPXMux8rZpJObHeLlOrQCpjwpY0kg Nfhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=zAh02HjxBOk2KRUatJRxDx5NVku2HqOvbJha2+jVU+M=; b=HhVb8oBZ7j6ZsnZniuW+VAkaKxl3pvIN9yKLc0Hh7M1mnpTVGT905moi/fn6XO7Hhf 33x97gmqFYaNojgKJSQjvKWbbr6EYWIqSwqJPgxhdGrTvU6WXnI+Ut+qK+plEwnmqrC3 SHsM6tCyXha7+rwj1k7ZnUqGt28Aq0Z6GW8ed7ZTsJwy1RtzxVM5YY/LqMnWZQP/fygx 6WllvyLBvGnDIk6HtywY+FkXJT/v2Aui9ODbLehfq/zetGsvmHusN/CV8k6FH/nMPDeJ dzIrIi3cKfvjAe5HW0+SyVgG+ZiDvl/Xj8XWnTK2Z9i0B+XbZA3RuUk8u7v2tlqsWAXt 7xkg== X-Gm-Message-State: AKGB3mIt4ZdWUN0BCic9kai0LehZ59hlg1/WD6A+axIx5udhAY+7kQgI k2ykA/a8u19BEgT+kvYsGjXyJsQvk7yA+TcDA27liQ== X-Google-Smtp-Source: ACJfBosfHOFyho7hXfiB1zwRUjsmVQjV2P6ltHEERCKrjXCml/75pWTSWKJ4IVeJ681zyxmrf4+FO+JMoM4rhZw/gYc= X-Received: by 10.80.205.15 with SMTP id z15mr27981651edi.83.1515608610535; Wed, 10 Jan 2018 10:23:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.208.220 with HTTP; Wed, 10 Jan 2018 10:23:09 -0800 (PST) From: Imran Raza Khan Date: Wed, 10 Jan 2018 22:23:09 +0400 Message-ID: Subject: Re: Design: State Machine implementation in Apache Camel To: users@camel.apache.org Content-Type: multipart/alternative; boundary="94eb2c1aecf2d9885905627020e9" --94eb2c1aecf2d9885905627020e9 Content-Type: text/plain; charset="UTF-8" Hi Steve, Thanks for detail reply. - I will evaluate StatefulJ if it fits into my requirements. >> With Camel, I prefer to route a message, and then hand off the work as fast as possible, and then free up the routing to handle more messages. To separate concerns, if the action being performed is not directly related to one of the EIPs, then I would avoid performing it with Camel. - I have more than 100 states and on every request on the base of different criteria it select 10 to 15 states to be process. As from sample table you can see mostly i required integration with different nodes on backend like billing system, customer profile system, SMSc, catalog manager etc. My program infact take request and forward on base of state. Due to integration almost 6 to 7 backed systems with different protocols SOAP, REST, XMLRPC, SQL Procedures calls i choose camel. For some legacy nodes i suppose to retry multiple times so again camel support in this regard very well. >> For better granularity, you can split up the process steps into their own routes, which is what I would personally do. Each phase (order creation, order placement, and order completion, notifications, etc) would include the error handling that you will want in your order placement chain of operations. - In sample table i showed only couple of states otherwise we cant divide it into three categories as you mentioned, we have 100 of products and to order each we have different states and nodes to handle. in some case i only call 2 back-end nodes and for some scenario i have to call all 7 to 8 back-end nodes before final processing of order. Same product has different prices and rules on base of customer profile. Regards --94eb2c1aecf2d9885905627020e9--