UiPath > configファイルを読み込む前に行うべきエラーハンドリング

はじめに

ReFrameworkを学んだ時に学習したことをもう一つ紹介しようと思います。一つ目に学んだことは、SecureTypeの重要性についてでした。それはこちらについて記載しております。

今回ご紹介するのは、InitialAllSettingsについてです。

元々はDictionary型変数「config」をアウトプットするためのワークフローですが、その事前作業に必要なことをちょっと追記しようと思います。

コンフィグファイルをお客様が編集する場合、エラー率は高まる

まず、このお話の前提条件についてですが、UiPath Orchestratorにパブリッシュしていないというケースについてです。この恐ろしさについて、ちょっと私の経験談を交えて語ってみたいと思います。

何が恐ろしいかというと、UiPath Orchestratorのアセットにあたる情報もコンフィグファイルの中に格納しなければならないです。あらゆるユーザーが何度も何度もコンフィグファイルを開いたは情報を編集して閉じる、つまりコンフィグファイル自体が破損してしまう恐れが高いのです。

お客様はモンスターです。

知っておくべきこととして、お客様は私たちの想像を絶するほどの方法でロボットを操作します。”まさか”コンフィグファイルを削除しないだろう。”まさか”ロボットのワークフローを削除しないだろう、”まさか”……、その”まさか”をしでかしてしまうのがお客様です。

「お客様のコンピューターリテラシーは高いはずである」という性善説に立つのはロボットの品質向上を低下させる一番の要因です。 「仕様書に書いたじゃん!」と文句を言ってもいいですが、余計な争い事は初期設定で避けるべきです。

コンフィグファイルにはシートの保護を絶対にかけるべき

もうこれは絶対と言っていいでしょう。必ず、必ずエクセル自体にシートの保護をかけてください。もうこれは鉄則です。

  • シート名を誤って違うものに変更してしまう
  • シートを削除してしまう
  • 列名を変更してしまう
  • 変数名を変更してましう

こうした変更すや削除の可能性を事前に防いでくれるのが、シートの保護です。必ず行ってください。

チェック1:コンフィグファイルが存在するか

その上でコンフィグファイルをチェックします。まずは何をチェックするのか、それはコンフィグファイルが存在するかです(笑)。笑ってしまいますよね。けど発生しかねないケースです。

お客様は様々な方法でコンフィグファイルを操作します。コンフィグファイルをデスクトップフォルダに置いたり、時にはコンフィグファイル自体を切り取って移動させてしまうこともありました。 まずコンフィグファイルが存在するかを確認しましょう。

チェック2:変数のパスは本当に存在するのか

ロボットを実行している途中で必要なファイルが存在していない場合、エラーが発生します。 特にプロジェクトフォルダ外のファイルを参照する場合、エラーが発生する確率は高まります。

プロセスの段階でエラーハンドリングをしてもいいのですが、私はもう初期設定の段階でファイルが存在するのかチェックします。

列「check path」を挿入し、パスのチェックを行う

一般的に用いられるコンフィグファイルは3列「name, value, description」ですが、そこに1列「check path」を追加します。

この「check path」の列内に文字記載があった場合、そのパス存在してるのかをチェックします。もしも存在しない場合スローでエラーを吐き出します。

コンフィグファイルを読み取ったDataTableをFor Each Rowでループさせ、もしも列「check path」に何か文字を含んでいた場合、パスの存在を確認します。

もしもフォルダーパスもファイルパスもない場合、List型変数「not_exist_path_list」に格納し、最後に 「not_exist_path_list」 にコレクションが存在する場合、スローを発生させます。

やっとコンフィグファイルをDictionary化することができました!

こうした段階を踏んだ後に、コンフィグファイルを読みます、この時点で初期設定何かしらのエラーが発生した場合、この時点でエラー、です

ワークフロー概要

Excel管理からAssetへ

これやり出し始めるとキリがないですよね、ワークフローが全てちゃんと揃っているのかも確認しなければなりません。なので、UiPath Orchestratorにロボットパブリッシュしてお客さんが変更するべき設定はアセットに書くべきです。

ロボットを実行した時に必要なワークフローが全て揃っているのかをチェックした上で実行するという方もいました。工数がすごいわかりますよね。

では、素晴らしいRPAの時間をお過ごしください。

256件のフィードバック

  1. You actually make it appear so easy with your presentation but I in finding this matter to be really something which I think I
    might by no means understand. It seems too complicated and very vast for me.
    I’m having a look forward on your subsequent put
    up, I will try to get the dangle of it! Escape room

  2. Right here is the perfect webpage for anyone who wants to understand this topic. You understand so much its almost tough to argue with you (not that I personally would want to…HaHa). You certainly put a new spin on a subject that’s been discussed for decades. Excellent stuff, just wonderful.

  3. Excellent site you’ve got here.. It’s hard to find high-quality writing like yours nowadays. I truly appreciate individuals like you! Take care!!

  4. I really love your site.. Excellent colors & theme. Did you make this web site yourself? Please reply back as I’m attempting to create my own personal site and would like to find out where you got this from or exactly what the theme is named. Thanks!

  5. Your style is so unique in comparison to other folks I have read stuff from. Many thanks for posting when you’ve got the opportunity, Guess I will just book mark this blog.

  6. Oh my goodness! Impressive article dude! Thanks, However I am having problems with your RSS. I don’t know the reason why I can’t subscribe to it. Is there anybody else having similar RSS issues? Anyone that knows the solution will you kindly respond? Thanks!!

  7. Good day very cool blog!! Man .. Beautiful .. Amazing .. I’ll bookmark your site and take the feeds additionally…I am satisfied to find numerous helpful info right here within the put up, we need work out extra techniques on this regard, thank you for sharing.

  8. After exploring a few of the articles on your web page, I truly appreciate your way of writing a blog. I saved as a favorite it to my bookmark site list and will be checking back in the near future. Please visit my website too and tell me what you think.

  9. Howdy! This blog post couldn’t be written much better! Looking at this article reminds me of my previous roommate! He always kept preaching about this. I am going to forward this post to him. Pretty sure he will have a very good read. Many thanks for sharing!

  10. An intriguing discussion is worth comment. There’s no doubt that that you ought to publish more on this topic, it might not be a taboo subject but usually people don’t talk about these subjects. To the next! Best wishes.

  11. Hello there! This post could not be written any better! Going through this article reminds me of my previous roommate! He constantly kept preaching about this. I most certainly will send this information to him. Pretty sure he’s going to have a good read. Many thanks for sharing!

  12. Spot on with this write-up, I actually feel this web site needs far more attention. I’ll probably be back again to see more, thanks for the info!

  13. Spot on with this write-up, I seriously feel this site needs a great deal more attention. I’ll probably be returning to read through more, thanks for the information!

  14. best online pharmacies in mexico [url=http://mexicanpharm24.cheap/#]Mexican pharmacy ship US[/url] mexican border pharmacies shipping to usa

  15. buy medicines online in india [url=http://indianpharm24.pro/#]Indian pharmacy worldwide delivery[/url] indian pharmacy

  16. indian pharmacy online [url=http://indianpharm24.pro/#]indian pharm 24[/url] п»їlegitimate online pharmacies india

  17. Discovering Sugar Protector has actually been a game-changer for
    me, as I have actually constantly been vigilant concerning handling my blood sugar level levels.
    I now really feel empowered and positive in my capability to preserve healthy
    and balanced degrees, and my most current medical examination have reflected this development.
    Having a trustworthy supplement to match my a huge resource of convenience, and I’m
    really grateful for the substantial difference Sugar Protector has actually made in my overall health.

  18. Incorporating Sugar Defender into my everyday program has actually been a game-changer for my overall health.
    As a person that currently focuses on healthy and balanced consuming,
    this supplement has actually given an included boost of protection. in my power degrees, and my desire for harmful
    snacks so simple and easy can have such a profound influence on my day-to-day live.

  19. Integrating Sugar Defender right into my daily routine overall well-being.
    As somebody that focuses on healthy eating, I appreciate the added security this supplement
    gives. Because starting to take it, I have actually observed a significant enhancement in my energy
    degrees and a significant reduction in my desire for undesirable treats such a
    such a profound influence on my daily life.

  20. For several years, I have actually fought unforeseeable blood sugar swings
    that left me really feeling drained and tired. But because including Sugar
    my power degrees are currently secure and regular, and I
    no longer hit a wall in the mid-days. I value that it’s a
    mild, natural strategy that doesn’t included any type
    of undesirable side effects. It’s really changed my every day life.

  21. Finding Sugar Protector has been a game-changer for me, as I’ve constantly been vigilant concerning handling
    my blood sugar levels. With this supplement, I really feel encouraged
    to organize my health, and my latest clinical
    check-ups have actually mirrored a significant turnaround.
    Having a credible ally in my corner provides me with a complacency
    and peace of mind, and I’m deeply thankful for the profound difference Sugar Defender has actually made in my
    well-being.

  22. For many years, I have actually battled unforeseeable blood
    sugar level swings that left me really feeling drained and sluggish.

    But given that including Sugar my energy levels are currently steady and regular, and I no more hit a wall in the mid-days.
    I value that it’s a gentle, all-natural technique that doesn’t come
    with any type of undesirable adverse effects. It’s truly changed my
    day-to-day live.

  23. I have to thank you for the efforts you have put in writing this blog. I’m hoping to view the same high-grade content from you in the future as well. In fact, your creative writing abilities has encouraged me to get my very own site now 😉

  24. I’m amazed, I have to admit. Seldom do I come across a blog that’s both educative and interesting, and without a doubt, you’ve hit the nail on the head. The problem is something not enough people are speaking intelligently about. Now i’m very happy that I stumbled across this during my hunt for something relating to this.

  25. Good day! Do you know if they make any plugins to help with
    Search Engine Optimization? I’m trying to get my website to rank
    for some targeted keywords but I’m not seeing very good success.
    If you know of any please share. Thanks! You can read similar article here:
    Blankets

  26. Nice post. I learn something new and challenging on blogs I stumbleupon everyday. It will always be useful to read content from other authors and practice something from other websites.

  27. Howdy! I just would like to offer you a huge thumbs up for the great information you’ve got right here on this post. I’ll be returning to your blog for more soon.

  28. I really love your website.. Excellent colors & theme. Did you develop this website yourself? Please reply back as I’m wanting to create my own personal blog and want to know where you got this from or what the theme is called. Cheers.

  29. Hey there! Do you know if they make any plugins to assist with Search Engine Optimization? I’m
    trying to get my website to rank for some targeted keywords but I’m not
    seeing very good gains. If you know of any please share.
    Cheers! You can read similar art here: Eco wool

  30. The very next time I read a blog, Hopefully it won’t fail me as much as this one. After all, Yes, it was my choice to read through, however I really thought you would probably have something helpful to talk about. All I hear is a bunch of complaining about something you could possibly fix if you were not too busy looking for attention.

  31. You are so interesting! I don’t suppose I have read a single thing like that before. So good to find another person with some original thoughts on this subject. Really.. thank you for starting this up. This website is something that is needed on the web, someone with some originality.

  32. It is perfect time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I want to suggest you few interesting things or tips. Maybe you can write next articles referring to this article. I desire to read even more things about it!

  33. Can I simply say what a comfort to find somebody that genuinely knows what they are discussing over the internet. You actually know how to bring a problem to light and make it important. A lot more people ought to look at this and understand this side of the story. I was surprised that you aren’t more popular because you certainly possess the gift.

  34. I blog quite often and I really thank you for your content. This great article has really peaked my interest. I will bookmark your website and keep checking for new information about once per week. I opted in for your RSS feed too.

  35. sugar defender official website For several years, I have
    actually battled uncertain blood glucose swings that left me really feeling
    drained pipes and lethargic. Yet considering that incorporating Sugar Protector into
    my routine, I have actually noticed a significant improvement
    in my general power and security. The feared mid-day distant memory, and I
    value that this natural remedy achieves these outcomes with no unpleasant or unfavorable reactions.

    honestly been a transformative discovery for me.

  36. I’m impressed, I have to admit. Rarely do I come across a blog that’s equally educative and interesting, and without a doubt, you’ve hit the nail on the head. The problem is something too few men and women are speaking intelligently about. I’m very happy I stumbled across this in my search for something regarding this.

  37. Greetings, I believe your site may be having browser compatibility problems. Whenever I look at your web site in Safari, it looks fine however, when opening in I.E., it has some overlapping issues. I simply wanted to give you a quick heads up! Besides that, fantastic site.

  38. When I originally left a comment I appear to have clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get four emails with the exact same comment. Is there a way you can remove me from that service? Cheers.

  39. Oh my goodness! Amazing article dude! Thank you, However I am going through difficulties with your RSS. I don’t understand why I am unable to subscribe to it. Is there anybody else having the same RSS issues? Anyone who knows the solution can you kindly respond? Thanx.

  40. I truly love your site.. Very nice colors & theme. Did you build this web site yourself? Please reply back as I’m looking to create my own personal blog and would like to learn where you got this from or just what the theme is called. Appreciate it!

  41. Hello! I could have sworn I’ve visited this blog before but after browsing through a few of the articles I realized it’s new to me. Nonetheless, I’m definitely pleased I found it and I’ll be bookmarking it and checking back regularly!

  42. Aw, this was a very nice post. Taking the time and actual effort to produce a very good article… but what can I say… I put things off a lot and never seem to get nearly anything done.

  43. Hi there! I could have sworn I’ve visited this website before but after going through some of the articles I realized it’s new to me. Nonetheless, I’m certainly delighted I discovered it and I’ll be bookmarking it and checking back frequently.

  44. I’m impressed, I have to admit. Rarely do I come across a blog that’s equally educative and engaging, and without a doubt, you have hit the nail on the head. The issue is something that too few men and women are speaking intelligently about. I’m very happy that I found this during my search for something relating to this.

  45. Hello! I simply would like to offer you a huge thumbs up for the excellent information you have here on this post. I’ll be returning to your site for more soon.

  46. You’re so cool! I don’t believe I have read through anything like that before. So nice to find somebody with some unique thoughts on this subject matter. Seriously.. thanks for starting this up. This site is one thing that is needed on the internet, someone with a bit of originality.

  47. You are so interesting! I do not think I’ve truly read through anything like that before. So nice to find another person with original thoughts on this topic. Really.. thank you for starting this up. This site is one thing that is required on the internet, someone with a bit of originality.

  48. také jsem si vás poznamenal, abych se podíval na nové věci na vašem blogu.|Hej! Vadilo by vám, kdybych sdílel váš blog s mým facebookem.

  49. I blog frequently and I really appreciate your information. This article has truly peaked my interest. I am going to book mark your website and keep checking for new details about once a week. I subscribed to your RSS feed as well.

  50. Hello there! This post could not be written any better! Looking through this article reminds me of my previous roommate! He continually kept preaching about this. I am going to send this article to him. Pretty sure he’s going to have a great read. Thank you for sharing!

  51. I’m extremely pleased to find this site. I need to to thank you for ones time for this particularly wonderful read!! I definitely loved every little bit of it and i also have you saved to fav to look at new things in your blog.

  52. I used to be very pleased to find this internet-site.I wanted to thanks on your time for this glorious learn!! I definitely having fun with each little bit of it and I’ve you bookmarked to take a look at new stuff you blog post.

  53. An interesting discussion is definitely worth comment. I do believe that you ought to publish more on this issue, it may not be a taboo subject but typically people do not speak about these topics. To the next! Kind regards.

  54. Hi there! This blog post could not be written any better! Reading through this article reminds me of my previous roommate! He always kept preaching about this. I will forward this article to him. Fairly certain he will have a very good read. Thanks for sharing!

  55. |Tato stránka má rozhodně všechny informace, které jsem o tomto tématu chtěl a nevěděl jsem, koho se zeptat.|Dobrý den! Tohle je můj 1. komentář tady, takže jsem chtěl jen dát rychlý

  56. Everything is very open with a precise explanation of the challenges. It was truly informative. Your site is very useful. Many thanks for sharing!

  57. You’re so interesting! I do not believe I’ve truly read through a single thing like this before. So great to find somebody with a few original thoughts on this subject. Really.. thanks for starting this up. This site is one thing that is required on the internet, someone with some originality.

  58. |Tato stránka má rozhodně všechny informace, které jsem o tomto tématu chtěl a nevěděl jsem, koho se zeptat.|Dobrý den! Tohle je můj 1. komentář tady, takže jsem chtěl jen dát rychlý

  59. Aw, this was an incredibly nice post. Taking the time and actual effort to generate a top notch article… but what can I say… I procrastinate a whole lot and don’t manage to get nearly anything done.

  60. You made some really good points there. I looked on the web to learn more about the issue and found most people will go along with your views on this website.

  61. This is a very good tip particularly to those new to the blogosphere. Brief but very precise information… Many thanks for sharing this one. A must read post!

  62. Having read this I thought it was very informative. I appreciate you spending some time and energy to put this information together. I once again find myself spending way too much time both reading and commenting. But so what, it was still worthwhile!

  63. I truly love your site.. Very nice colors & theme. Did you develop this amazing site yourself? Please reply back as I’m hoping to create my own website and want to know where you got this from or just what the theme is named. Cheers!

  64. Greetings! Very useful advice within this post! It’s the little changes that make the largest changes. Many thanks for sharing!

  65. When I initially commented I appear to have clicked on the -Notify me when new comments are added- checkbox and now whenever a comment is added I recieve four emails with the exact same comment. Is there a means you can remove me from that service? Appreciate it.

  66. Good post. I learn something totally new and challenging on sites I stumbleupon on a daily basis. It’s always interesting to read content from other writers and practice a little something from their websites.

  67. Your style is so unique in comparison to other folks I’ve read stuff from. Thank you for posting when you have the opportunity, Guess I will just book mark this blog.

  68. A motivating discussion is worth comment. I think that you should write more on this subject, it might not be a taboo matter but generally people do not discuss such issues. To the next! Cheers!

  69. I really love your website.. Great colors & theme. Did you build this website yourself? Please reply back as I’m hoping to create my own personal website and want to learn where you got this from or exactly what the theme is named. Appreciate it!

  70. Hi, I do think this is a great blog. I stumbledupon it 😉 I may come back once again since I saved as a favorite it. Money and freedom is the best way to change, may you be rich and continue to help other people.

  71. I blog quite often and I really thank you for your information. This article has really peaked my interest. I’m going to bookmark your website and keep checking for new details about once a week. I opted in for your Feed as well.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

目次