Friday, 31 March 2017

TACTIC Javascript API Start-up

Using the TACTIC 4.6 API from javascript is very simple.  You just have to reference
a single javascript file.  You can either reference a local copy of this file:

<script src="js/tactic.js"> </script>

Or you can reference it from TACTIC server itself:

<script src="http://<server>/context/spt_js/tactic.js"> </script>

Replace <server> with your own server IP or domain name running TACTIC.  This
will import all the necessary javascript libraries and functions to interact with
the TACTIC server.

Next you will need to generate an API ticket.  This key is a long unique alpha-numeric string of characters.  This ticket is added to the API key, which has the form:

http<s>://<server>/<site>/<project>/ticket/<ticket>

So, for example, you would set up the server with the following:

<script>
tactic = TACTIC.get();
var key = http://<server>/workflow/workflow/ticket/571be6bb09142c4c6b883e0c9f310f57");
tactic.set_key(key);
</script>

If you wish to build tickets dynamically, then this can be done from a custom login
screen that captures a login and password.  For there, you would execute the following:

tactic = TACTIC.get();
tactic.set_server(server);
var ticket = tactic.get_ticket(name, password);
tactic.set_ticket(ticket);

where "server" is the IP or domain name of your TACTIC Server and name and password
are user entered fields.  Once you have a ticket, this can be used until the ticket
expires on the server.

You are all ready to access any of TACTIC API functionality.  To check if you can access the server, simple run the ping method:

alert( tactic.ping() )

If it returns "OK", you have successfully accessed the TACTIC server with proper credentials.

At this point, you have the full API at your disposal.  As an example, you could run a query for tasks completed assigned to Fred:

tasks = tactic.query("sthpw/task", {
    filter: [['status','Complete'],['assigned','fred']],
} );


If you wish to run this asynchronously, you would add an on_complete callback:

tactic.query("sthpw/task", {
    filter: [['status','Complete'],['assigned','fred']],
    on_complete: (tasks) => {
        console.log(tasks)
    }
} );


Or if you wish to use promises:

tactic.p_query("sthpw/task", {
    filter: [['status','Complete'],['assigned','fred']],
} )
.then( (tasks) => {
    console.log(tasks)
} );


Or we could use an expression to get the same result:

var expression = "@SOBJECT(sthpw/task['status','Complete']['assigned','fred'])"
tactic.p_eval(expression)
.then( (tasks) => {
    console.log(tasks)
} );



The javascript implementation is a fully featured TACTIC API.  This is useful for
many applications such as server side javascript such as NodeJS, Mobile apps that
run on javascript.  It can also be used in WordPress or Drupal applications on the
browser.


108 comments:

  1. Replies
    1. IEEE Final Year projects Project Center in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

      JavaScript Training in Chennai

      JavaScript Training in Chennai

      The Angular Training covers a wide range of topics including Components, project projects for cseAngular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Delete
  2. Funclub Casino Review is the best online Funclub Casino. New casino and gambling games, with the largest prizes and jackpots. Do not hesitate.Thank you for very nice its sharing

    ReplyDelete
  3. Your article is very interesting.
    Want to make your own website!!!
    Contact Essencesoftwares the best website development company in Gurgaon.
    Essence Softwares provides: Website Development Services, App Development Services, Digital Marketing Services, IoT Solutions Services and Startup Consulting Services.
    Web Development Company in India
    App Development Company in India
    Web Development Company in Edinburgh
    App Development Company in Edinburgh
    Web Development Company in Gurgaon
    App Development Company in Gurgaon

    ReplyDelete
  4. We are amongst the Best Mobile App Development Company in Mumbai that offer IOS, Android Mobile Application Development services that look Great and act Smart.
    Mobile app development company in mumbai

    ReplyDelete
  5. I was looking for some decent stuff on the subject and have had no luck so far. You just had a new big fan! ...

    360DigiTMG Data Science Courses

    ReplyDelete
  6. I just found this blog and hope it continues. Keep up the great work, it's hard to find good ones. I added to my favorites. Thank you.

    360DigiTMG Data Science Certification

    ReplyDelete
  7. Excellent article with informative information thanks for sharing.
    Data Science Course in Hyderabad

    ReplyDelete
  8. Now is the perfect time to plan for the future and now is the time to be happy. I have read this article and if I can I would like to suggest some cool tips or advice. Perhaps you could write future articles that reference this article. I want to know more!

    Business Analytics Course in Bangalore

    ReplyDelete
  9. Writing in style and getting good compliments on the article is hard enough, to be honest, but you did it so calmly and with such a great feeling and got the job done. This item is owned with style and I give it a nice compliment. Better!

    Data Analytics Course in Bangalore

    ReplyDelete
  10. Top quality blog with valuable information, I really enjoyed reading it looking forward for next blog update.
    Data Analytics Course Online

    ReplyDelete
  11. I found Habit to be a transparent site, a social hub that is a conglomerate of buyers and sellers willing to offer digital advice online at a decent cost.

    Artificial Intelligence Course in Bangalore

    ReplyDelete
  12. I am a new user of this site, so here I saw several articles and posts published on this site, I am more interested in some of them, hope you will provide more information on these topics in your next articles. PMP Training in Hyderabad

    ReplyDelete
  13. Nice Information Your first-class knowledge of this great job can become a suitable foundation for these people. I did some research on the subject and found that almost everyone will agree with your blog.
    Cyber Security Course in Bangalore

    ReplyDelete
  14. Writing in style and getting good compliments on the article is hard enough, to be honest, but you did it so calmly and with such a great feeling and got the job done. This item is owned with style and I give it a nice compliment. Better!
    Cyber Security Training in Bangalore

    ReplyDelete
  15. Really nice and interesting blog information shared was valuable and enjoyed reading this one. Keep posting. Thanks for sharing.
    Data Science Training in Hyderabad

    ReplyDelete
  16. Great article with excellent information found resourceful and enjoyed reading it thank you, looking forward for next blog.
    typeerror nonetype object is not subscriptable

    ReplyDelete
  17. Really, this article is truly one of the best, information shared was valuable and resourceful Very good work thank you.
    Data Scientist Training in Hyderabad

    ReplyDelete
  18. Fantastic article and excellent topic with valuable information thanks for sharing.
    Data Science Course in Bangalore

    ReplyDelete
  19. I have to search sites with relevant information ,This is a
    wonderful blog,These type of blog keeps the users interest in
    the website, i am impressed. thank you.
    Data Science Course in Bangalore

    ReplyDelete
  20. I have to search sites with relevant information ,This is a
    wonderful blog,These type of blog keeps the users interest in
    the website, i am impressed. thank you.
    Data Science Training in Bangalore

    ReplyDelete
  21. Thanks for posting the best information and the blog is very helpful.artificial intelligence course in hyderabad

    ReplyDelete
  22. i am glad to discover this page : i have to thank you for the time i spent on this especially great reading !! i really liked each part and also bookmarked you for new information on your site.
    cyber security training in bangalore

    ReplyDelete
  23. I want to leave a little comment to support and wish you the best of luck.we wish you the best of luck in all your blogging enedevors.
    data science course fees in bangalore

    ReplyDelete
  24. i am glad to discover this page : i have to thank you for the time i spent on this especially great reading !! i really liked each part and also bookmarked you for new information on your site.
    cyber security training in bangalore

    ReplyDelete
  25. I Want to leave a little comment to support and wish you the best of luck.we wish you the best of luck in all your blogging endeavors.
    data science course in bangalore with placement

    ReplyDelete
  26. i am glad to discover this page : i have to thank you for the time i spent on this especially great reading !! i really liked each part and also bookmarked you for new information on your site.
    best data science courses in bangalore

    ReplyDelete
  27. Really wonderful blog completely enjoyed reading and learning to gain vast knowledge. Eventually, this blog helps in developing certain skills which in turn helpful in implementing those skills. Thanking the blogger for delivering such beautiful content and keep posting the contents in the upcoming days.

    Digital Marketing Training in Bangalore

    ReplyDelete
  28. I really enjoyed reading your blog. It was very well written and easy to understand. Unlike other blogs that I have read which are actually not very good. Thank you so much!

    Data Science Training in Bangalore

    ReplyDelete
  29. Really wonderful blog completely enjoyed reading and learning to gain vast knowledge. Eventually, this blog helps in developing certain skills which in turn helpful in implementing those skills. Thanking the blogger for delivering such beautiful content and keep posting the contents in the upcoming days.

    Digital Marketing Training in Bangalore

    ReplyDelete
  30. The truly mind-blowing blog went amazed with the subject they have developed the content. This kind of post is really helpful to gain knowledge of unknown things which surely triggers to motivate and learn the new innovative contents. Hope you deliver the similar successive contents forthcoming as well.

    Cyber Security Course

    ReplyDelete
  31. Extraordinary blog went amazed with the content that they have developed in a very descriptive manner. This type of content surely ensures the participants to explore themselves. Hope you deliver the same near the future as well. Gratitude to the blogger for the efforts.

    Machine Learning Course in Bangalore

    ReplyDelete
  32. Thanks for posting the best information and the blog is very important.artificial intelligence course in hyderabad

    ReplyDelete
  33. Really impressed! Everything is a very open and very clear clarification of the issues. It contains true facts. Your website is very valuable. Thanks for sharing.

    Business Analytics Course

    ReplyDelete
  34. This is a very nice one and gives in-depth information. I am really happy with the quality and presentation of the article. I’d really like to appreciate the efforts you get with writing this post. Thanks for sharing.
    Java course in Kolkata

    ReplyDelete
  35. It fully emerged to crown Singapore's southern shores and has undoubtedly put it on the world residential monument map. Still, I scored more points than I have in one season for GS. I think it would be hard to find someone with the same consistency that I have had over the years, so I'm happy.

    Digital Marketing Course in Bangalore

    ReplyDelete
  36. I am really happy to say it’s an interesting post to read . I learn new information from your article , you are doing a great job . Keep it up

    Data Science Training in Hyderabad

    ReplyDelete
  37. Fantastic Site with relevant information and content Shared was knowledgeable thank you.

    AWS Training in Hyderabad

    ReplyDelete
  38. I want to say thanks to you. I have bookmark your site for future updates.
    digital marketing courses in hyderabad with placement

    ReplyDelete
  39. I was basically inspecting through the web filtering for certain data and ran over your blog. I am flabbergasted by the data that you have on this blog. It shows how well you welcome this subject. Bookmarked this page, will return for extra. data science course in jaipur

    ReplyDelete
  40. Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one. Continue posting. A debt of gratitude is in order for sharing. python course in delhi

    ReplyDelete
  41. Heya just wanted to giive you a quick heads up and let
    you know a few of thhe images aren’t loading properly.
    I’m not sre why but I think its a linkinng issue.
    I’ve tried it in two different web browsers and both show tthe same outcome.부산오피

    ReplyDelete

  42. Togel Online Live Draw Sydney berlokasi di Macau,
    yang merupakan bidang Judi terpopuler & mengklaim melebihi Tuturnya Vegas sebagai
    Togel Online Live Draw Sdy terbesar ia Didunia
    Meneruskan resor terkini menaikkan tempat & sehabis itu menjadi
    koleksi untuk selamanya sepenuhnya 4 pemain profesional.

    ReplyDelete
  43. A good blog always contains new and exciting information and as I read it I felt that this blog really has all of these qualities that make a blog.

    Data Science Training in Bangalore

    ReplyDelete
  44. Happy to chat on your blog, I feel like I can't wait to read more reliable posts and think we all want to thank many blog posts to share with us.

    Machine Learning Course in Bangalore

    ReplyDelete
    Replies
    1. Data Sidney ialah situs yang mengumpulkan keluaran togel sidney, hasil pengeluaran sidney hari ini.semua data angka keluaran yang kami rangkum berasal dari situs resminya sydneypools.

      Delete
  45. It is late to find this act. At least one should be familiar with the fact that such events exist. I agree with your blog and will come back to inspect it further in the future, so keep your performance going.

    Digital Marketing Training in Bangalore

    ReplyDelete
  46. Great tips and very easy to understand. This will definitely be very useful for me.
    data scientist certification malaysia

    ReplyDelete
  47. You have completed certain reliable points there. I did some research on the subject and found that almost everyone will agree with your blog.

    Artificial Intelligence Training in Bangalore

    ReplyDelete
  48. Very good message. I came across your blog and wanted to tell you that I really enjoyed reading your articles.

    Business Analytics Course

    ReplyDelete
  49. Very good message. I came across your blog and wanted to tell you that I really enjoyed reading your articles.


    Best Data Science Courses in Bangalore

    ReplyDelete
  50. Very good message. I came across your blog and wanted to tell you that I really enjoyed reading your articles.


    Data Analytics Course in Bangalore

    ReplyDelete
  51. Very good message. I came across your blog and wanted to tell you that I really enjoyed reading your articles.

    Digital Marketing Course in Bangalore

    ReplyDelete
  52. Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one. Continue posting. A debt of gratitude is in order for sharing. cloud computing course in jaipur

    ReplyDelete
  53. A good blog always contains new and exciting information, and reading it I feel like this blog really has all of these qualities that make it a blog.

    Machine Learning Training in Bangalore

    ReplyDelete
  54. You have completed certain reliable points there. I did some research on the subject and found that almost everyone will agree with your blog.


    Data Analytics Course in Bangalore

    ReplyDelete
  55. I wanted to leave a little comment to support you and wish you the best of luck. We wish you the best of luck in all of your blogging endeavors.

    Data Analytics Course in Patna

    ReplyDelete
  56. I simply want to tell you that I am just beginner to blogs and certainly enjoyed you’re web page. Almost certainly I’m want to bookmark your site . Feel free to visit my website; 안전놀이터

    ReplyDelete
  57. Its an amazing website, really enjoy your articles. Helpful and interesting too. Keep doing this in future. I will support you.Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. Feel free to visit my website; 온라인카지노

    ReplyDelete
  58. I always like finding a site that gives you very good ideas because I like learning new stuff. Happy that I found your site because I greatly liked it and I anticipate your following post. A fantastic blog and i’ll come back again for more useful content Feel free to visit my website; 온라인카지노

    ReplyDelete
  59. It's like you've got the point right, but forgot to include your readers. Maybe you should think about it from different angles.


    Data Analytics Bangalore

    ReplyDelete
  60. Very good message. I came across your blog and wanted to tell you that I really enjoyed reading your articles.

    Data Analytics Course in Nashik

    ReplyDelete
  61. If a newbie enters a programming class, he needs to pick up the pace on time and finish off all the Java assignments on time as other students in the class. But it is not always possible for each and every student to finish the task on time. They need to handle other subjects too. But deadlines never wait for anyone, and if not submitted within the stipulated time, the assignments will get rejected by the professor. So, the student needs to clear the assignments on time. Hence, they look for Java programming assignment help at the hour of need.

    ReplyDelete
  62. Very good message. I came across your blog and wanted to tell you that I really enjoyed reading your articles.

    Data Scientist Course in Nashik

    ReplyDelete
  63. As I am looking at your writing, 온카지노 I regret being unable to do outdoor activities due to Corona 19, and I miss my old daily life. If you also miss the daily life of those days, would you please visit my site once? My site is a site where I post about photos and daily life when I was free.


    ReplyDelete
  64. Thanks for sharing this blog. It was so informative.
    Phases of hacking
    Steps of hacking

    ReplyDelete
  65. Awesome blog. Thanks for sharing such a worthy information....
    Python Training in Bangalore
    Python Classes in Pune

    ReplyDelete
  66. Thank you for your message. I've been thinking about writing a very similar article for the last few weeks, I'll probably keep it short and to the point and link to this article instead if that's interesting. Thank you.

    Business Analytics Course in Ernakulam

    ReplyDelete
  67. 사설토토
    토토사이트


    I’m not sure why but I think its a linking issue. I’ve tried it in two different web browsers and both show the same results. Check other way to work it out.. Thanks!

    ReplyDelete
  68. Nice post. I learn something more challenging on different blogs everyday. It will always be stimulating to read content from other writers and practice a little something from their store. I?d prefer to use some with the content on my blog whether you don?t mind. Natually I?ll give you a link on your web blog. Thanks for sharing.


    토토사이트
    토토

    ReplyDelete
  69. Its content is brilliant in many ways. I think it is an attractive and revealing material. Thank you very much for caring about your content and your readers.

    Business Analytics Course in Patna

    ReplyDelete
  70. I am really impressed to see the variable content segment and give you great hat off to you. I have the special urge to administrator to make the most valuable solution. I am more interested to attach with Online Assignment Help directory for the most value solution.

    ReplyDelete
  71. I am here for the first time. I found this table and found it really useful and it helped me a lot. I hope to present something again and help others as you have helped me.

    Business Analytics Course in Nagpur

    ReplyDelete
  72. Fashion design is a type of art that focuses on the production of clothing and other accessories for everyday use. Haute couture and ready-to-wear are the two basic genres of modern fashion design. The haute couture line is tailored to a select group of customers and is sized to fit them perfectly. A designer must be a member of the Syndical Chamber for Haute Couture and show a new collection twice a year, with a minimum of 35 distinct costumes each time, in order to qualify as an haute couture house. Click here to know more about the fashion design course in Pune.

    ReplyDelete
  73. Write My Dissertation in an ideal manner demands massive endeavors for which students often require Dissertation Help from domain specialists who have got professional experience in Dissertation Writing Service. Great Assignment Helper offers the much needed and reliable help, free of plagiarism and grammatical errors, at the cheapest price.

    ReplyDelete
  74. Hello students, we provide UK's best assignment help for all subject students. so if you need any type of assignment help then visit "Uk assignment help" and hire "Assignment writing help uk", we will complete your assignment before your last date. students are getting the advantage of the service don't be late click now

    ReplyDelete
  75. This comment has been removed by the author.

    ReplyDelete
  76. Thank you for sharing this information with us, and best wishes with your upcoming blog.

    fashion designing course in Pune

    ReplyDelete
  77. Thank you so much for sharing a this kind of useful. information
    Site: Marlboro retro jacket

    ReplyDelete
  78. That is why I will definitely share your blog with my friends. I wish you success!
    Site : Flying Tigers Jet Nose Art A2 Jacket

    ReplyDelete
  79. To be a successful fashion designer, you must have unique and inventive fashion skills. Candidates in the field of fashion design must also be up to date on the latest techniques and trends in the industry. Buyers, for example, are looking forward to purchasing more sustainable products. As a result, thorough investigation and analysis skills are required before launching the new set of designs. Click here to learn more about Fashion Designing Course in Pune.

    Fashion Designing Course in Pune

    ReplyDelete
  80. Great knowledgeable article on Javascript API
    I know this is off topic but if you need help with your essay writing in Malaysia then you can hire Essay helper Malaysia and get your essays finished by the experts.

    ReplyDelete
  81. I am overwhelmed by your post with such a beautiful subject. I usually visit their blogs and update myself through the information they contain, but today's blog would be most appreciated. Well done!

    Business Analytics Course in Durgapur

    ReplyDelete
  82. SAP affirmation is turning out to be progressively significant to workers and organizations as SAP keeps on adding new applications, apparatuses and interfaces for virtually every area of business the executives. You can get this declaration as a part of a degree or through an independent course. The SAP course incorporates a few modules between key to specialized sorts covering practically all parts of business the board. It gives the ability to oversee SAP business by configuration, including hierarchical design arrangement, broadening arrangements and that's only the tip of the iceberg. SAP-ensured experts can fabricate data stockrooms, plan input screens and oversee information bases.

    SAP Training in Chennai
    SAP Course in Chennai

    ReplyDelete
  83. Learn the fundamentals of Data Science and master the skills to handle epic amounts of data collected by organizations today. Gain expertise in organizing, analyzing, and transforming data to uncover its hidden power. Drive your career forward with a Data Science course in Bangalore and learn to uncover insights to present critical findings using visualization tools. Not only this, avail the best-in-class content delivered by stellar faculty who use a blended approach of theory as well as practical knowledge to ensure all the concepts are crystal clear.

    Best Data Science Institute in Bangalore

    ReplyDelete
  84. Data Science is a booming field with ample job opportunities. Start your preparation today with 360DigiTMG and become a Data Scientist in the right way.

    Data Science Course in Jodhpur

    ReplyDelete