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.


99 comments:

  1. 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
  2. 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
  3. 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
  4. 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
  5. Excellent article with informative information thanks for sharing.
    Data Science Course in Hyderabad

    ReplyDelete
  6. 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
  7. 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
  8. Top quality blog with valuable information, I really enjoyed reading it looking forward for next blog update.
    Data Analytics Course Online

    ReplyDelete
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. Thanks for posting the best information and the blog is very important.artificial intelligence course in hyderabad

    ReplyDelete
  22. 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
  23. 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
  24. Fantastic Site with relevant information and content Shared was knowledgeable thank you.

    AWS Training in Hyderabad

    ReplyDelete
  25. 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
  26. 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
  27. 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

  28. 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
  29. 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
  30. 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
  31. Great tips and very easy to understand. This will definitely be very useful for me.
    data scientist certification malaysia

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

    Business Analytics Course

    ReplyDelete
  33. 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
  34. 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
  35. 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
  36. 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
  37. 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
  38. 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
  39. Thanks for sharing this blog. It was so informative.
    Phases of hacking
    Steps of hacking

    ReplyDelete
  40. 사설토토
    토토사이트


    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
  41. 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
  42. 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
  43. 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
  44. 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
  45. This comment has been removed by the author.

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

    fashion designing course in Pune

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

    ReplyDelete
  48. 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
  49. 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
  50. 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
  51. 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
  52. Get essay assignment help from qqi assignments, which offers "pay to write my essay" services. With this service, we complete your assignments with high-quality content on time and at a low cost.

    ReplyDelete
  53. Data Science is a growing domain with multitude of job opportunities, start your Data Scientsist Course today with 360DigiTMG and become a Data Scientist

    Data Science Course in Bangalore with Placement

    ReplyDelete
  54. The roles of the Data Scientist and Data Analysts job roles are different. Given under are the tasks of the Data Scientist and Data Analyst respectively.


    Data Science Course in Jaipur

    ReplyDelete
  55. Excellent post. I really enjoy reading and also appreciate your work. This concept is a good way to enhance knowledge. Keep sharing this kind of articles, Thank you.POS Software Solutions in Singapore

    ReplyDelete
  56. I think it's a very good idea. I wouldn't have a better idea. You are a very smart friend. How can you be so smart? I envy you very much.안전놀이터추천

    ReplyDelete
  57. I was introduced to this site by a friend. There are a lot of good posts. I'll visit often.

    ReplyDelete
  58. Nice article! It was very innovative thing with unique title and keep it up...
    how to get a divorce in va
    online solicitation of a minor

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

    ReplyDelete
  60. Thank you for sharing your valuables. It’s a nice post shared. I enjoyed your site and I believe is quite a knowledgeable piece for everyone. Thank you for sharing. uniport basic studies admission form deadline

    ReplyDelete
  61. Thanks for sharing this valuable post.
    Seek the best Business Law Case Study Help at a student-friendly price. We have law experts who assist you with 100% plagiarism free work. You can avail of our top-notch Case Study Writing Services with authentic content writing. We always strive for the quality of the assignment papers with on-time delivery.

    ReplyDelete
  62. Thank you for sharing this information
    Do you need help with your Best assignment help UK ? Don’t worry
    Assignment Task is one of the most famous and trusted assignment help in the UK, USA, Canada, Malaysia, Singapore and others worldwide. We are giving our services with good quality of work. We have a team of brilliant Top writers who assist students in their assessment projects. We are 24/7available on the internet at: https://assignmenttask.com/

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

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

    ReplyDelete
  65. Thanks for sharing! Very informative. Software Testing Course in Pune with 100% Placement.

    ReplyDelete
  66. If you're a student in Ireland, you can find reliable research paper help Ireland from experienced writers who have a deep understanding of the academic standards and requirements of Irish universities.

    ReplyDelete
  67. Engage the most pleasing HND assignment assistants online to compose an assignment, essay, homework, HND Assignment Help UK & other academic papers for UK students. Case Study Help UK will help you achieve high grades to impress your professors behind getting HND qualified. We have professional writers to create plagiarism-free content in HND-written papers.

    ReplyDelete
  68. Are you a Student, and do you need Online Assignments / Homework Answers for any Questions? You can contact us online anytime because Assignment Task is a 24/7 assignment help services provider at a reasonable price. We offer assessment answers to all questions.

    ReplyDelete
  69. I have found a smart and educative blog web here. Nice and beautiful articles. Looking forward to more. Thanks for the interesting idea.- lasuth postgraduate in echocardiography admission requirements

    ReplyDelete
  70. Great blog
    As a student, it's essential to submit high-quality assignments that meet the standards set by your professors. But Greeceassignmenthelp.com can help. Their writers are dedicated to providing quality programming assignment help online Greece that can help you achieve your academic goals. We follow a strict quality assurance process to ensure that every assignment meets the highest standards of quality.

    ReplyDelete
  71. Are you facing a problem writing your MBA Assignment Writing? No worries, Case Study Help UK can quickly solve your problem and clear all doubts about your assignment project. We have a team of highly qualified MBA/PhD top writers, and they help students provide writer with their MBA Assignment Writing Services with plagiarism-free and original content. Meet us on the Internet at our website.

    ReplyDelete
  72. Dear students, do you need help with your finance assignment? Visit assignmenttask.com to write your project in any subject at a pocket-friendly price. We provide top-notch Finance Assignment Help from skilled finance experts. Our experts fulfill customers' demands as they require. We provide various subjects related to finance like accounting, business etc.

    ReplyDelete
  73. Case Studies Help Researchers
    Case Studies Help Researchers are Australia-based Assignment Writing Company for Quick Assistance. Our expert writers write an assignment with an analysis of the topic. We are here with a team of the best assignment writers to help with all kinds of academic assignment writing. Our experts specialize in an extensive subject field reinforced with the best assignment solutions. Students can meet us online via live chat support.

    ReplyDelete
  74. Thanks for sharing this post. I got information on this post. Keep sharing.
    lawyers for bankruptcy near me

    ReplyDelete
  75. This site is an essential resource for anyone looking to break into the tech industry or take the next step in their tech career. With its comprehensive list of job openings and user-friendly job search tools, you can quickly and easily find the right opportunity for your skills and experience. The site also provides helpful resources for job seekers, such as salary guides and resume writing tips. Whether you're just starting out in tech or looking to take your career to the next level, this site is a valuable tool for achieving your goals. >> part time job japan it

    ReplyDelete
  76. Do you need high-quality Business Plan Assignment Help in UAE? Visit us for more kind of information at Assignmenttask.com! We provide the most useful Assignment Help in UAE and writing services at pocket-friendly costs in all subjects. Our experts understand all guidelines and rules of colleges and universities, so they make unique content according to directions.

    ReplyDelete
  77. Are you looking for CDR Report Writing Help? You can contact us through live chat on our website at CDR Australia. We are all time present to help students. My CDR Australia has a dedicated group of experts and engineers. We provide all types of documents like CDR Report, CPD Report and Career Episode Writing etc.  

    ReplyDelete
  78. 24/7 Hours Available online is the most reliable Study Assignment Help for Editing Company in UAE for students. At Studyassignmenthelp.com supply editing and proofreading services from subject matter experts. They help students who want better grades on their homework projects. Do you want an A+ score and impress your professor? Don't late hurry up and get help from us.

    ReplyDelete